I'm using RVM in my OS X machine, I use ruby 1.9.2 by default with RVM.

Each time I create a terminal session I have to type "rvm gemset use rails_app", to use my gemset … I would like "rails_app" to somehow be my default gemset

I've tried doing:

 rvm use 1.9.2@rails_app --default

but then if I open a new terminal window and type rails I get :

/usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rails (>= 0) amongst [bundler-1.0.21, bundler-1.0.21, rake-0.9.2] (Gem::LoadError)
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /usr/local/Cellar/ruby/1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1202:in `gem'
    from /usr/local/bin/rails:18:in `<main>'

( it works fine If I just type rvm gemset use rails_app)

Thanks!

up vote 3 down vote accepted

This issue has recently been fixed. Run

rvm get head

and you should be able to set a default gemset and have it persist across Terminal sessions.

More info is here: https://github.com/wayneeseguin/rvm/issues/710

  • Yeah, I also reported in github. It's the correct answer though :) – Mr.Gando Jan 22 '12 at 2:23

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.