RubyMine allows you to debug a Ruby application deployed on a remote machine using an SSH connection. You need to perform the following steps before running a remote debugging session:
On a local machine, open an application to be debugged in RubyMine.
On a remote machine, make sure that SSH access is enabled.
Synchronize remote project sources with local ones by using Capistrano or a remote server configuration.
Configure a remote Ruby interpreter and specify mappings between files of local and remote sources.
Then, you can choose one of the following ways to debug a remote application:
You can start the debugging session for a required run configuration (Ruby, Rails, RSpec, etc.) as you do when debugging a local application.
If you cannot launch the application from the IDE, run the desired process on a remote machine and attach to this process.
If the ways above don't suit, try to debug your application using the Ruby remote debug run configuration.