Developing Rubygems with RVM and Bundler

Aug 3, 2010

It's safe to say that RVM and Bundler have completely changed how I interact with my Ruby applications and gems. It's pretty well understood how to use each by itself, I didn't have a good idea how to use them in tandem until recently. Parts of this post are based on Derek Kastner's great post on using Bundler.

When I grab the source for a random rubygem from github and want to run its tests or test drive it, I use RVM and Bundler to create a sandbox so I don't pollute the gems used by other Ruby projects on my box:

This means that gems should check in their gemspec into git and jeweler (or however you are generating your gemspec) should be declared as a development dependency. Do your gems pass this simple test? Any thoughts on how to make this even simpler?