1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Upgrading to 1.9.2 Using RVM


6 of 7

Copy Your Gemsets

Your gemsets built for 1.9.2-rc2 will work fine for 1.9.2-p0. If you're upgrading from a 1.8.x version, you should not copy your gemsets, as many 1.8.x gems do not work on 1.9.x, and will need to be recompiled even if they do.

Your gemsets can be copied over from one version to the other using the rvm gemset copy command. Remember that now that you've upgraded, the version 1.9.2 now refers to 1.9.2-p0 and the previous version (in my case) is referred to as 1.9.2-rc2. If you ever get confused as to which versions you have and what the shortened names refer to, issue the command rvm list to list all installed Rubies. And of course, to be safe, you may want to refer to all versions using the long names.

Alternatively, your gemsets can be migrated (or moved) from one version of Ruby to another. Remember that migrate moves gemsets, not leaving a copy behind. But if you wish to do it this way, you can run the following command.

$ rvm migrate 1.9.2-rc2 1.9.2-p0

The rvm gemset copy command works just like the cp or copy comamnd on many shells. It takes two arguments, a source and a destination. So to copy the global (unnamed) gemset from 1.9.2-rc2 to the current 1.9.2, the command would be as follows.

$ rvm gemset copy 1.9.2-rc2 1.9.2-p0

You can of course copy named gemsets as well. I'll do the same to copy my rails3 gemset over from 1.9.2-rc2 to 1.9.2-p0.

$ rvm gemset copy 1.9.2-rc2@rails3 1.9.2-p0@rails3

©2014 About.com. All rights reserved.