1

I'm trying to debug a sinatra app using RubyMine. I am using rackup to run the app on localhost and unicorn to run it on remote host. My ruby version is 1.9.3.

I should also note that the "run debug mode icon" is grayed out. I don't know what is missing from the configuration.

What gems do I need? What else do I need to do?

update: I have run the server process on localhost using rackup -p 9000. In order to start debugging -run rdebug-ide --port 1234 -- rackup and got this message :

Fast Debugger (ruby-debug-ide 0.4.17.beta16, ruby-debug-base 0.10.5.rc1) listens on 127.0.0.1:1234

I still don't understand how to debug using Rubymine. I have opened the browser in http://0.0.0.0:1234 and I don't get any response (it keeps loading)

I run the remote host using unicorn like so :

unicorn -c etc/fin_srv_unicorn.conf -E staging

how shold I set up remote debugging? I have tried also rack and ruby remote. Tried connection to the remote host and running the service (using the command listed above), and then running the rdebug like so :

rdebug-ide --port 1911 -- $SCRIPT$

where for $SCRIPT$ I have tried app/main.rb staging , unicorn -E staging, unicorn -c etc/fin_srv_unicorn.conf -E staging

WebQube
  • 8,510
  • 12
  • 51
  • 93
  • See [this answer](http://stackoverflow.com/a/10325110/104891) for the gems. [Remote debug configuration](http://www.jetbrains.com/ruby/webhelp/remote-debugging.html) can be used. – CrazyCoder Feb 09 '13 at 01:38
  • hi @CrazyCoder, I should point out that the `run debug mode` icon is grayed out, so I need to solve that first – WebQube Feb 09 '13 at 01:48
  • Did you read about Remote debug? You start the process outside RubyMine and then connect to it with the debugger. – CrazyCoder Feb 09 '13 at 01:53
  • I have read it and didn't quite understand what should I do, tried entering `rdebug-ide --port 1234 --dispatcher-port 26162 -- $SCRIPT$` under Run/Debug configuration -> Ruby but the button is still grayed out – WebQube Feb 09 '13 at 03:30
  • You should start the server process with this command and then use [**Ruby remote debug**](http://img713.imageshack.us/img713/9353/20130209081248.png) configuration type to connect and debug it. – CrazyCoder Feb 09 '13 at 04:13
  • hi @CrazyCoder, see update in msg body – WebQube Feb 09 '13 at 11:31
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/24233/discussion-between-webqube-and-crazycoder) – WebQube Feb 09 '13 at 12:32

0 Answers0