Question

If I quit OS X Terminal when the shell is positioned in an RVM-managed directory (e.g., a Rails app), and then restart Terminal, OS X kindly positions the shell in the directory where it was before. However, rvm does not seem to reset the gemset in use (e.g. Gemfile:#ruby-gemset).

Is this just me? Have I mucked something up? (Always possible!)

If others have the same issue, has anyone solved it or worked around?

Presently, I do cd ~; cd -, and RVM's "cd" implementation sets things up right. But it's kinda annoying. Really, I'd rather Terminal didn't save cwd in the first place; then I'd only need one cd!

Was it helpful?

Solution

You'll need to setup a base gemset in RVM first.

rvm gemset create gemsetnamehere

If you want to use that gemset as default, you just do like so:

rvm use 1.9.2-head@gemsetnamehere --default

The assumption in the above is that you're using ruby 1.9.2-head and want the gemset you just created gemsetnamehere as the default. Check the RVM docs here: http://rvm.io/gemsets/using

Also, if you want it just for that directory. Create a .rvmrc file in the project's root and include something like:

rvm 1.9.2-head2@gemsetnamehere

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top