-1

After creating the gemset, cd out of and back into the folder throws the error that the gemset does not exist.

Here is my shell session

dewet-mac:~ dewet$ cd ruby/routerscript/
Gemset 'routerscript' does not exist, 'rvm gemset create routerscript' first, or append '--create'.
dewet-mac:routerscript dewet$ rvm gemset create routerscript
gemset created routerscript => /Users/dewet/.rvm/gems/ruby-2.0.0-p0@routerscript
dewet-mac:routerscript dewet$ cd ..
dewet-mac:ruby dewet$ cd routerscript/
Gemset 'routerscript' does not exist, 'rvm gemset create routerscript' first, or append '--create'.

When I check in /Users/dewet/.rvm/gems/ the gem exists as ruby-2.0.0-p0@routerscript

How do I fix this?

dewet
  • 376
  • 1
  • 3
  • 16
  • what kind of project file do you use? is it `.rvmrc` - can you show its content. – mpapis Apr 06 '13 at 13:47
  • 1
    Thank you @mpapis, that answered my question, I am new to RVM and I did not understand that the error was in response to not finding the gemset as specified in the .rvmrc file, I had rvm `1.9.3@routerscript` in the .rvmrc file. Changed it to `rvm ruby-2.0.0-p0@routerscript` and it worked immediately. I would vote up your comment if I could. – dewet Apr 06 '13 at 15:16

2 Answers2

4

The error was is in response to not finding the Gemset that was specified in the .rvmrc project file. Edited the file to contain rvm ruby-2.0.0-p0@routerscript. That fixed it.

This implies silent use:

rvm use ruby-2.0.0-p0@routerscript

To allow automatic creation of gemsets use --create:

rvm --create ruby-2.0.0-p0@routerscript

To avoid trusting and not creating gemsets use .ruby-version / .ruby-gemset:

rvm rvmrc to .ruby-version

It will automatically migrate your .rvmrc to the new format.

More details at RVM site: https://rvm.io

mpapis
  • 52,729
  • 14
  • 121
  • 158
dewet
  • 376
  • 1
  • 3
  • 16
2

If you've only just installed RVM, make sure you restart your terminal.

Andy
  • 14,260
  • 4
  • 43
  • 56