Boopathi Rajaa
2013-Jun-24 13:07 UTC
Installing gems to user directory - Configurations - How to ?
I compiled Ruby from source, and installed it to /opt/ruby/ . The purpose is to have two versions of Ruby 1.9 and Ruby 1.8 ... Certain users can use 1.9 After creating a rails app (rails new app) , When a script performs `bundle install`, the gems are trying to get installed in /opt/ruby/. How to configure it to install it in user_home directory ? I don''t want to use the solution, where I install the gems as the root user to the ruby bin directory. This is the error that I get: Gem::Exception: Cannot load gem at [/opt/ruby/lib/ruby/gems/1.9.1/cache/multi_json-1.7.7.gem] in /home/boopathi/apps/abcd An error occurred while installing multi_json (1.7.7), and Bundler cannot continue. Make sure that `gem install multi_json -v ''1.7.7''` succeeds before bundling. -- 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/12228825-793f-4fa2-b7a1-7386c342b652%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Dheeraj Kumar
2013-Jun-24 16:50 UTC
Re: Installing gems to user directory - Configurations - How to ?
You could use rvm or rbenv instead. On Jun 24, 2013 10:05 PM, "Boopathi Rajaa" <legend.raju-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I compiled Ruby from source, and installed it to /opt/ruby/ . > The purpose is to have two versions of Ruby 1.9 and Ruby 1.8 ... Certain > users can use 1.9 > > After creating a rails app (rails new app) , When a script performs > `bundle install`, the gems are trying to get installed in /opt/ruby/. > How to configure it to install it in user_home directory ? > > I don''t want to use the solution, where I install the gems as the root > user to the ruby bin directory. > > This is the error that I get: > > Gem::Exception: Cannot load gem at > [/opt/ruby/lib/ruby/gems/1.9.1/cache/multi_json-1.7.7.gem] in > /home/boopathi/apps/abcd > An error occurred while installing multi_json (1.7.7), and Bundler cannot > continue. > Make sure that `gem install multi_json -v ''1.7.7''` succeeds before > bundling. > > -- > 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/12228825-793f-4fa2-b7a1-7386c342b652%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/CA%2BsTbyv59T82RA7aUpE9v14Pin%2Bb5auYE%3D20iw9MOkv9u3OMnQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
Robert Walker
2013-Jun-24 16:52 UTC
Re: Installing gems to user directory - Configurations - How to ?
Boopathi Rajaa wrote in post #1113443:> I compiled Ruby from source, and installed it to /opt/ruby/ . > The purpose is to have two versions of Ruby 1.9 and Ruby 1.8 ... Certain > users can use 1.9 > > After creating a rails app (rails new app) , When a script performs > `bundle > install`, the gems are trying to get installed in /opt/ruby/. > How to configure it to install it in user_home directory ? > > I don''t want to use the solution, where I install the gems as the root > user > to the ruby bin directory.Are you not able to use one of the Ruby version managers? https://github.com/sstephenson/rbenv or https://rvm.io -- Posted via http://www.ruby-forum.com/. -- 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/599e4eb562554a750dd1d79ab1070756%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.