From http://everydayrails.com/2010/09/13/rvm-project-gemsets.html Create a global gemsetThis is where things begin to get a little tricky. What we’re going to do is create a globalgemset that contains gems that will be used across multiple projects, then a project-specificgemset for each of our Rails applications. To begin, let’s make our global gemset:
What you put in @global is up to you, but try to keep it clean. Since the point of this exercise is to maintain separate development environments for Rails 2.3 and Rails 3, don’t install any frameworks in @global. Here I’m just loading some necessities. We’ll get to a project-specific gemset momentarily.
Set up your projectThanks to Bundler, getting your Rails 3 projects configured to use your new development environment should be fairly straightforward. First, we’ll create another gemset; this one will be specific to our Rails 3 project. Replacerails3_project with a gemset name that makes more sense for your project: $ rvm gemset create rails3_project $ rvm use @rails3_project Next, create a
You can install gems with bundler from your Gemfile and skip a certain environment with
To skip multiple environments do
This of course assumes you have a a gemfile something like:
Also, Michael points out that you can skip the slow “Fetching source index for http://rubygems.org/” by using “—no-update-sources” |
wiki >