[Bio-packaging] GEM_PATH

Ricardo Wurmus ricardo.wurmus at mdc-berlin.de
Tue Jul 7 12:54:34 UTC 2015

pjotr.public66 at thebird.nl writes:

> We are using this now:
>> GEM_PATH=/home/pjotrp/.guix-profile/lib/ruby/gems/2.2.0/ 

Do mean this is set as a default?  I have not found this in the sources
for the ruby-build-system.

> One of the BAD things of Rubygems is that there is no isolation
> between ruby versions and their gems. What we are doing here allows
> nokogiri to be installed in isolation for 2.1 series and 2.2 series,
> but not for minor numbers. I think that is wrong. We should at least
> allow for the minor number and patch level.

I'm not sure this is completely accurate.  With Guix we can install
software into different profiles.  It is not guaranteed that different
versions can be installed into the very same profile, which is probably
what you mean here.

> So
>   GEM_PATH=/home/pjotrp/.guix-profile/lib/ruby/gems/2.1.6p34/ 
> makes more sense to me. Even better we use the Guix hash. So for
> /gnu/store/c13v73jxmj2nir2xjqaz5259zywsa9zi-ruby-2.1.6/bin/ruby it
> would become 
>   GEM_PATH=/home/pjotrp/.guix-profile/lib/ruby/gems/c13v73jxmj2nir2xjqaz5259zywsa9zi-ruby-2.1.6/

What exactly is the use case here?  For different versions of Ruby,
modules may not be compatible with one another anyway, so one would be
better off installing conflicting versions of Ruby and modules depending
on them into different profiles.

> It would guarantee isolation of gems. No more rvm/rubygem/etc hell.

Well, gems are already isolated, are they not?  They have their very own
output directory in the store.  It's a matter of profile-building that
puts them all into one place.

I'm probably misunderstanding the problem, though.  Could you please
elaborate?  Are multiple profiles not working in this case?

~~ Ricardo

More information about the bio-packaging mailing list