Faster Rails development with bundler and rvm

If you’re anything like me, you’ve found the rails server and console taking longer and longer to launch lately. Even switching to Rails 3 for most active projects hasn’t really helped. But I finally found a solution a couple of weeks ago.

I found it reading Mikel Lindsaar’s Bundle Me Some Sanity where he outlines the way that bundler coupled with rvm allows a rather different and much cleaner way to manage gems in a ruby application.

I’d been aware of rvm as a way to cleanly manage different versions of ruby on a single machine, but had missed their (recent addition in 0.1.25 of) Named Gem Sets. With Named Gem Sets you can specify a version of ruby and a separate gem library for each app, reducing dependency resolution time considerably.

I already can’t imagine switching away from this.

Tags: , , ,

2 comments

  1. I’m also using rvm and I love it. By the way, with latest Bundler, if you lock Gemfile, it does not do dependency resolution any more, so you get similar speedup.

  2. Hey James, thanks for pointing out bundler and rvm, it saved me a lot of time managing the migration process to rails 3.

    I did have a a bit of a hard time figuring out the best way to manage gems across different projects with rvm and bundler though so I took the time to write out a step-by-step guide to do just that. Hopefully my guide to managing gems with rvm and bundler helps someone get up and running with it faster than I did.