RubyInstaller vs. RailsInstaller and debugging with RubyMine

RubyMine is decent IDE both in Windows and Ubuntu, including, happily, a debugger integrated into the IDE.  Coming from the world of Visual Studio, I’m quite happy to see this as a command-line debugger is something I was reluctant to learn.

However, I was having problems debugging Ruby programs in RubyMine – it required a gem (linecache19) to be installed, then complained during the installation process that my Path did not point to DevKit.  I also noticed that when I installed gems manually, the Path was being temporarily “fixed” to include DevKit.

Turns out I had installed Ruby from the rubyinstaller-1.9.3-p286.exe a week ago, then I installed railsinstaller-2.1.0.exe, and I had to different instances of Ruby running on my computer.

I ended up uninstalling everything except RubyMine, then re-installed just the RailsInstaller.  Still, it didn’t work, and a helpful post on the JetBrains Developer Community forum provided the answer:

See if you have any invalid SDK in Settings | Ruby SDK and Gems and remove it.

So, off I went to File -> Settings, clicked on the “Ruby SDK and Gems” item and noticed that the Ruby interpreter was still pointing to “Ruby193” rather than “RailsInstaller\Ruby1.9.3\bin\ruby.exe”.  Click on “Remove SDK”, click on “Add SDK…” and a dropdown has the correct path!

Now, notice in the “Settings” window the header for the tree: “Projects Settings (Hunt the Wumpus”.  It turns out that the above change must be made for every project (I had one other at this point) even though for the other project, the path was correct!  I still had to remove the SDK (that appeared correct) and add the SDK again.

Finally, the debugger is working!



One thought on “RubyInstaller vs. RailsInstaller and debugging with RubyMine

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s