If you're developing Ruby applications on Windows I'd strongly recommend you to use a virtual machine and install ruby there. If you're using JRuby, than you might be just fine sticking with Windows development environment. This post isn't anyhow limited to Windows. If you are a purist and don't want to install any dev tools on your local machine and use VMs for everything, than this is for you as well.
Adding Ruby SDK from RubyMine's
Project settings was always causing me some troubles. To avoid those, just do it like this:
Tools -> Deployment -> Configuration...
I know, it's not intuitive to set up a
deployment server for getting remote ruby SDK to work. That's why I'm writing this post.
Then you just click
Add Server. Give it a name (vmbox, vagrant or something) and choose
SFTP as type.
Then just fill the settings and
Test SFTP connection... to see if connection works properly.
Last part of this configuration, which is very important is in
Mappings tab. You need to map your local and server path. I use
vagrant, which will share my project files in
Now you can go to
File -> Settings... -> Ruby SDK and Gems and add
You'll now have
Fill from deployment server settings button available. Click on it and select the name of the server configuration that you've created in previous step.
Now you'll see filled setting. Be sure to select correct
Ruby interpreter path. By default system ruby will be selected, which you might don't want to use.
That is it. For the first time it will take some time for RubyMine to download all installed gems you have. But from then on, you can run / debug everything from it. You can quickly open all the gems you are using and debug them with visual debugger.
You are now able to debug all kind of programs like rails application, rake tasks, simple ruby scripts, etc...
Just set your break point and run a task with debug button (green bug button in