[DRE-maint] Bug#654550: Bug#654550: rbenv: Should work seamlessly with system rubygems.

Matijs van Zuijlen matijs at matijs.net
Fri Feb 3 12:59:47 UTC 2012


On 02/02/2012 04:33 PM, Antonio Terceiro wrote:
> Matijs van Zuijlen escreveu isso aí:
>> On 02/01/2012 12:20 AM, Antonio Terceiro wrote:
>>> Matijs van Zuijlen escreveu isso aí:
>>>> That sounds like a very good plan. I have one thing I would like to
>>>> change, which is that it would set GEM_HOME to ~/.gem/ruby/1.8/gems,
>>>> to match what plain rubygems would do when given the option
>>>> --user-install.
>>>
>>> Not sure about that. If we use the same directory as --user-install
>>> would, you risk having two different interpreters installing gems to the
>>> same place. I think it's better to keep each interpreter with its
>>> isolated gem environment.
>>
>> I'm not sure I see how that risk would happen. It would be only the
>> two system Rubies that install to ~/.gem/ruby/<version>/gems.
>
> If you pass --user-install to gem under any Ruby 1.9, they will all
> install to the same place.

I see what you mean. Sounds like a dangerous option in any case.

>>> All in all, if you choose to use rbenv, you should not need to care
>>> where the gems are installed, as long as their programs are in your path
>>> and you can require their libraries.
>>
>> True, but it would be nice if the system rubies could use the same
>> gems, whether or not they're being run through rbenv. I would like
>> to avoid having more copies of gems installed than necessary.
>
> You can symlink ~/.gem/ruby/$version to the corresponding gems directory
> inside ~/.rbenv/

That's a good tip, thanks. And thanks for fixing this bug.

Regards,
-- 
Matijs





More information about the Pkg-ruby-extras-maintainers mailing list