Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RubyMine, Vagrant, RVM

I'm on OS X host where I have RubyMine (7) and last Vagrant installed. I've prepared shell script for provision my vagrant box with RVM, ruby (2.1.2), bundle my project, run all tests, manually start server. Everything seems fine. Now I want to make RubyMine works with RVM ruby from vagrant guest (run server, specs with debugging). I've added remote ruby SDK, point them to RVM ruby binary (http://prntscr.com/5i6g1f). But when I try to start development server, I've receive message that no rails installed in SDK. But it is installed via bundle, I can run server manually from guest. Please, advice me how can I tell RubyMine where to find gems inside Vagrant with RVM? Thanks :)

like image 966
Zozo Avatar asked Dec 18 '14 12:12

Zozo


1 Answers

When using RVM, the path to remote SDK should not point to the binary but rather to the ruby gems directory.

In your case, for instance, the correct path should be:

/home/vagrant/.rvm/gems/ruby-2.1.2

Note that it should point to the DIRECTORY not the executable!

To find the directory simply run:

$ rvm gemdir

Then copy and paste the result.

like image 177
RDP Avatar answered Oct 01 '22 06:10

RDP