Question

I have a rails project with the following development environment:

  • Host machine: MacOS 10.8
  • Vagrant with precise 64
  • Rubymine
  • Rbenv

Everything works fine: rbenv is installed in the guest machine, and my rails server is started on port 3000 in the guest machine, and forwarded onto the host (config in Vagrant file).

I would like Rubymine (installed on the host machine) to use the SDK inside vagrant, and the gems inside Vagrant, and inside rbenv.

How can I do that ?


To be clear:

Host machine -> OSX
Guest machine -> Lucid64 in vagrant
Was it helpful?

Solution

In rubymine:

  • go to options (command+,)
  • search SDK in options,
  • click Add SDK / new remote
  • click Fill from Vagrant config and select the folder where your Vagrantfile is located
  • Very important: In the field Ruby interpreter path, put /home/vagrant/.rbenv/versions/2.0.0-p247/bin/ruby (your ruby version may change, check your versions with ls /home/vagrant/.rbenv/versions in your guest machine
  • Click OK, grab a cofee
  • Your're done
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top