Ruby Mine remote debugging doesn't work with Rails

I'm a bit new to Ruby so maybe I'm doing it wrong. I have a local Virtual Machine which is where I have my rails app. And RubyMine is actually editing the local files on my host (which my VM also has access to through filesharing).

In RubyMine I went to Run/Debug Configurations and then I went to Defaults/Remote Debug (screenshot attached). There it says:

rdebug-ide --host 0.0.0.0--port 1234 --dispatcher-port 26162 -- $COMMAND$
remote host: localhost
remote port: 1234
local port: 26162
local root folder:
/Users/name/Development/ruby/project

So I *think* that means I need to go to my VM, go to my project folder, and run that command with the rails server:
rdebug-ide --host 0.0.0.0--port 1234 --dispatcher-port 26162 -- rails s

When I do that I see:
Fast Debugger (ruby-debug-ide 0.4.22, debase 0.0.9) listens on 0.0.0.0:1234

But then I noticed the rails server isn't actually running (which I go to the webpage nothing loads) and when I go back to RubyMine and press the Debug button it says "Error Running Development: No Rails found in SDK"

What am I doing wrong?



Attachment(s):
Screen Shot 2014-03-28 at 6.45.36 PM.png
Screen Shot 2014-03-28 at 6.42.00 PM.png
2 comments

Nevermind I figured out my issue. In Run/Debug Configurations I needed to actually *add* a debug configurations by clicking the plus (+) button. I had been viewing and editing the default configuration. Once I added the configuration to my project, and I clicked the debug button, I no longer received the "No Rails found in SDK" error. It attempted to connect to the debugger remotely through port 1234 (which had been port forwarded).

Once the connection was established the ruby-debug-ide ran the rails server, and when I set a breakpoint and made an incoming connection it tripped and I could see all my local variables. Very nice!

0

I'm happy to hear that you was able to find the right way do to remote debugging (it means that our UI is not too bad ;)
Also if you get reasonable performance while editing locally evailable sources of the project you may want to consider using remote sdk for such development
to get all power of RubyMine :)  

See http://confluence.jetbrains.com/display/RUBYDEV/Configuring+Remote+Interpreters and https://www.jetbrains.com/ruby/webhelp/configuring-remote-interpreters-via-ssh.html
for more information.

Regards, Oleg.

0

Please sign in to leave a comment.