Rubymine use local gem configuration

678 views Asked by At

I'm running Ruby mine 7.1.2 on Windows and I'm having difficulty with it because it seems to want to use its own gems and version of fun where. My application works fine from the command line if I do bundle install or bundle exec rails script but when I try to run from the IDE it complains about missing gems.

I could just try to reinstall all the gems via ruby mine but some of the gems require special customization in Windows and doing that from the command line is much easier. Is there anyway I can have ruby mine just use the gems which are already installed?

1

There are 1 answers

0
Adam Kewley On

Rubymine will usually bundle your ruby SDK (i.e. ruby itself) and all it's associated gems so that you don't end up with weird configuration dependencies.

If you want to circumvent that then follow an official guide. In addition to that guide, be aware that there are also per-run SDK settings. These kick in when running or debugging a RubyMine project and need to be configured in the run -> configuration settings dialog.

My (unsolicited) additional advice is that I'd recommend figuring out what aspects of your global ruby installation are causing issues with RubyMine's bundle installer. The reason RubyMine sandboxes several SDKs is to reduce major headaches when you go to deploy your applications. Without it, you might encounter dependency hell when you deploy your application. From my personal (and extremely annoying) experience, rushing these initial set-up steps tend to come back with vengeance when you want to run ruby apps elsewhere.