Edit your ~/.bash_profile and add:
export EDITOR=/Applications/RubyMine.app/Contents/MacOS/rubymine

Then navigate to your project and type

> bundle open ‘gem’