Hi all, Can some tell me why we need a $GEM_PATH location per ruby versions when using tools like RVM & rbenv? I would like to switch between rubies without always need to download the gem''s a second time as I am currently working off a very poor internet connection. Thanks! Luke Hamilton “When I let go of what I am, I become what I might be.” – *Lao Tzu* -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAGYXMga5jgvEXEQ%2Bs%2BTpsa5QvWXcc8mmJ7uDJaOZMtebnRHZHA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
tool like rbenv can set what ruby version should on your project/directory . i mean you can use diferent ruby version for different project/directory. for that, gems need match ruby version for execute on command line. i think is reason why gem location in each ruby version. Pada Sabtu, 13 Juli 2013 13:20:47 UTC+7, Luke Hamilton menulis:> > Hi all, > > Can some tell me why we need a $GEM_PATH location per ruby versions when > using tools like RVM & rbenv? > > I would like to switch between rubies without always need to download the > gem''s a second time as I am currently working off a very poor internet > connection. > > Thanks! > Luke Hamilton > > “When I let go of what I am, I become what I might be.” – *Lao Tzu* >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ff471ee0-347a-458b-af86-4238b0c77f21%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
also appeared in Ruby Parley - moved to https://github.com/rubygems/rubygems/pull/596 $GEM_HOME is a way of controlling rubygems gems install location: * benefits: thanks to GEM_HOME you can install ruby as "root" and gems as users, or reinstall ruby without removing gems, it allows you to separate the ruby directory from gems direcotry, you can also maintain multiple sets of gems by manipulating GEM_HOME to different directories - this is how rvm gemsets work * problems: the need to use different gem paths per ruby/version exist because some gems might require specific ruby version, compiled c-extensions or might include implementation specific code/libraries, they can not be mixed all together, but that''s just few percent of gems - rest of them can be mixed in one directory and it is what I have implemented in the pull request mentioned above Cheers, Michal On Saturday, July 13, 2013 8:35:11 PM UTC+2, Bayu Aldi Yansyah wrote:> > tool like rbenv can set what ruby version should on your project/directory > . i mean you can use diferent ruby version for different project/directory. > for that, gems need match ruby version for execute on command line. i think > is reason why gem location in each ruby version. > > Pada Sabtu, 13 Juli 2013 13:20:47 UTC+7, Luke Hamilton menulis: >> >> Hi all, >> >> Can some tell me why we need a $GEM_PATH location per ruby versions when >> using tools like RVM & rbenv? >> >> I would like to switch between rubies without always need to download the >> gem''s a second time as I am currently working off a very poor internet >> connection. >> >> Thanks! >> Luke Hamilton >> >> “When I let go of what I am, I become what I might be.” – *Lao Tzu* >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e51301f6-44b9-44f5-8182-0d961adc67bb%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
You only need multiple copies of any gems that require a specific version to run with your current ruby. GEM_PATH can include multiple directories just as the shell PATH does. So if you''re running two different ruby environments, RUBY_A and RUBY_B, you could use a GEM_PATH that looks like: RUBY_A_GEM_PATH=a_gems_dir:common_dir RUBY_B_GEM_PATH=b_gems_dir:common_dir On Sunday, July 14, 2013 4:00:41 AM UTC-4, Michał Papis wrote:> > also appeared in Ruby Parley - moved to > https://github.com/rubygems/rubygems/pull/596 > > $GEM_HOME is a way of controlling rubygems gems install location: > > * benefits: thanks to GEM_HOME you can install ruby as "root" and gems as > users, or reinstall ruby without removing gems, it allows you to separate > the ruby directory from gems direcotry, you can also maintain multiple sets > of gems by manipulating GEM_HOME to different directories - this is how rvm > gemsets work > > * problems: the need to use different gem paths per ruby/version exist > because some gems might require specific ruby version, compiled > c-extensions or might include implementation specific code/libraries, they > can not be mixed all together, but that''s just few percent of gems - rest > of them can be mixed in one directory and it is what I have implemented in > the pull request mentioned above > > Cheers, > Michal > > On Saturday, July 13, 2013 8:35:11 PM UTC+2, Bayu Aldi Yansyah wrote: >> >> tool like rbenv can set what ruby version should on your >> project/directory . i mean you can use diferent ruby version for different >> project/directory. for that, gems need match ruby version for execute on >> command line. i think is reason why gem location in each ruby version. >> >> Pada Sabtu, 13 Juli 2013 13:20:47 UTC+7, Luke Hamilton menulis: >>> >>> Hi all, >>> >>> Can some tell me why we need a $GEM_PATH location per ruby versions when >>> using tools like RVM & rbenv? >>> >>> I would like to switch between rubies without always need to download >>> the gem''s a second time as I am currently working off a very poor internet >>> connection. >>> >>> Thanks! >>> Luke Hamilton >>> >>> “When I let go of what I am, I become what I might be.” – *Lao Tzu* >>> >>-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/36844e66-425e-4b21-b5a9-e555483e9d7f%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
I ended up switching from rbenv to chruby as its only keeps one GEM_PATH location per major version of rubies and not a new location for all the patch levels. And its much simpler too. :) Kind regards, Luke Hamilton +61 0430223558 @lukekhamilton “When I let go of what I am, I become what I might be.” – *Lao Tzu* On Sun, Jul 14, 2013 at 9:28 PM, Rick <richard.t.lloyd-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You only need multiple copies of any gems that require a specific version > to run with your current ruby. GEM_PATH can include multiple directories > just as the shell PATH does. So if you''re running two different ruby > environments, RUBY_A and RUBY_B, you could use a GEM_PATH that looks like: > > RUBY_A_GEM_PATH=a_gems_dir:common_dir > RUBY_B_GEM_PATH=b_gems_dir:common_dir > > > > On Sunday, July 14, 2013 4:00:41 AM UTC-4, Michał Papis wrote: >> >> also appeared in Ruby Parley - moved to https://github.com/rubygems/** >> rubygems/pull/596 <https://github.com/rubygems/rubygems/pull/596> >> >> $GEM_HOME is a way of controlling rubygems gems install location: >> >> * benefits: thanks to GEM_HOME you can install ruby as "root" and gems as >> users, or reinstall ruby without removing gems, it allows you to separate >> the ruby directory from gems direcotry, you can also maintain multiple sets >> of gems by manipulating GEM_HOME to different directories - this is how rvm >> gemsets work >> >> * problems: the need to use different gem paths per ruby/version exist >> because some gems might require specific ruby version, compiled >> c-extensions or might include implementation specific code/libraries, they >> can not be mixed all together, but that''s just few percent of gems - rest >> of them can be mixed in one directory and it is what I have implemented in >> the pull request mentioned above >> >> Cheers, >> Michal >> >> On Saturday, July 13, 2013 8:35:11 PM UTC+2, Bayu Aldi Yansyah wrote: >>> >>> tool like rbenv can set what ruby version should on your >>> project/directory . i mean you can use diferent ruby version for different >>> project/directory. for that, gems need match ruby version for execute on >>> command line. i think is reason why gem location in each ruby version. >>> >>> Pada Sabtu, 13 Juli 2013 13:20:47 UTC+7, Luke Hamilton menulis: >>>> >>>> Hi all, >>>> >>>> Can some tell me why we need a $GEM_PATH location per ruby versions >>>> when using tools like RVM & rbenv? >>>> >>>> I would like to switch between rubies without always need to download >>>> the gem''s a second time as I am currently working off a very poor internet >>>> connection. >>>> >>>> Thanks! >>>> Luke Hamilton >>>> >>>> “When I let go of what I am, I become what I might be.” – *Lao Tzu* >>>> >>> -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/36844e66-425e-4b21-b5a9-e555483e9d7f%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAGYXMgaAm%3DgBWXqSx513QBAwRZBifjUos7LyOy589eAzbV2New%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.