RVM + Bundler + RubyMine
On my current project, we needed to be able to use RVM with Bundler but we want access to our bundled gems from Rubymine.
You’re going to want to write an alias in your .bashrc/.zshrc/.whatevershrc for this one. You can use most of the below:
export PROJECT_PATH=the_path_to_your_Rails_project_using_bundler_goes_here
alias rubymine="rvm ruby-1.8.6-tv1_8_6_287 ;\
export GEM_HOME=#{PROJECT_PATH}/vendor/bundler_gems/ruby/1.8;\
export GEM_PATH=${GEM_HOME};/Applications/RubyMine\ 2.0.1.app/Contents/MacOS/rubymine"
What we’re doing here:
- We then override the gem repo to point to our bundled gems (which are conveniently formatted as a gem repo)
- Then we fire up Ruby Mine with the above environment (Thanks to Brennan Dunn here).
Now close and reopen your shell.
From there, you go into RubyMine’s settings, click on “Add SDK”…

… unhide the hidden directories like so…

… then navigate to your Ruby VM and hit OK:

Voila!
Posted by evan on Friday, January 29, 2010
blog comments powered by Disqus




My name is Evan Light and, yes, I am a nerd. I'm also a professional software developer who, after spending one too many years contracting to the federal government, escaped into the far more enjoyable commercial world. Having spent several years using C and even more using Java (the latter very nearly caused me to give up programming entirely), I consider myself fortunate to have discovered Ruby and to use it as part of my daily work.