Attach to process... says 'no processes to attach to'


I configured a remote interpreter according to this page:

But when I do Attach to process... select the ssh connection, the list will be empty saying 'no processes to attach to'

The process is running on the remote machine:

# ps aux | grep ruby
me 21947 1.0 1.1 352608 93588 ? Sl 07:21 0:41 /usr/bin/ruby /path/to/script --param1 --param2 /some/path --param3 --param4

The ssh-connection seems to work, too. At least i do not get any error message.

Local ruby processes will show under Attach to process...-> Localhost

I even tried using the same ruby versions on both machines. Nothing changed. Does that even matter?


Comment actions Permalink


could you please specify what remote server (OS) you have and which Ruby version you're using? Have you launched the script via RubyMine?

In addition, what RubyMine version are you using? Does the problem persist in RubyMine 2019.2 EAP?

Comment actions Permalink

OS remote server:

# uname -a
Linux 4.4.179-99-default #1 SMP Tue May 14 18:07:16 UTC 2019 (c775d39) x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/os-release
NAME="openSUSE Leap"
PRETTY_NAME="openSUSE Leap 42.3"

ruby version

# ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux-gnu]

affected Rubymine versions


2019.2 EAP

other info

The process I want to attach to was started from the remote machine without the use of Rubymine.


Comment actions Permalink

Just to be sure, do you see the remote processes in case you run them via RubyMine run configuration?

Comment actions Permalink

In addition, after starting your process (which isn't shown in Attach to) on the remote machine please run the following command (on the server)

lsof -c ruby | grep -E 'bin/ruby([[:digit:]]+\.?)*$'

and attach its output.

Comment actions Permalink

> Just to be sure, do you see the remote processes in case you run them via RubyMine run configuration?

You mean, if I run the process I want to attach to via Rubymine on the remote machine? There is no Rubymine on the remote machine.


lsof -c ruby | grep -E 'bin/ruby([[:digit:]]+\.?)*$

does not return any output, because the process name ist not "ruby". if you omit the "-c ruby" from your command, the process i want to attach to shows up (in lsof output)

Comment actions Permalink

In the first message you wrote that the process started was a ruby one. If it's not then which process do you run?

Comment actions Permalink

Well, actually I am quite clueless at the moment, why the command ist shown as "wds". But as you can see in the last column, it is a ruby process.

lsof | grep -E 'bin/ruby([[:digit:]]+\.?)*$'
wds 11276 wds txt REG 7,1 8656 7684 /usr/bin/ruby
ruby-time 11276 13376 wds txt REG 7,1 8656 7684 /usr/bin/ruby


Comment actions Permalink

OK, now it's getting hacky:

Due to my inability to influence the command name as stated by lsof, I replaced the lsof-binary with the following script (original is


if [[ "${1}" == "-c" && "${2}" == "ruby" ]]
then -c wds | sed s/^wds\ /ruby\ /g
else "${@}"

While the originals output was empty

# -c ruby | grep -E 'bin/ruby([[:digit:]]+\.?)*$'

or showed the process only when filtering for another command name

# -c wds | grep -E 'bin/ruby([[:digit:]]+\.?)*$'
wds 11276 wds txt REG 7,1 8656 7684 /usr/bin/ruby

the modified finds my process when looking for "ruby" command and even replaces the command name.

# lsof -c ruby | grep -E 'bin/ruby([[:digit:]]+\.?)*$'
ruby 11276 wds txt REG 7,1 8656 7684 /usr/bin/ruby

Yet, Rubymine won't find the process to attach to.


Comment actions Permalink

Could you please attach the output of the following command being run on your remote server with launched processes:

bin/sh -c lsof -c ruby | grep -E 'bin/ruby([[:digit:]]+\.?)*$'
Comment actions Permalink
# /bin/sh -c lsof -c ruby | grep -E 'bin/ruby([[:digit:]]+\.?)*$'
wds 2947 wds txt REG 7,1 8656 135329 /usr/bin/ruby
ruby-time 2947 3340 wds txt REG 7,1 8656 135329 /usr/bin/ruby
OK, that way it shows up (with unmodified lsof). :)



Comment actions Permalink

I mean there is output for the shell command. Problem not solved still... Can you help? :)

Comment actions Permalink

Do you have any guess why these 2 processes have the same PID?


Please sign in to leave a comment.