AlexanderM
AlexanderM

Reputation: 1683

How to force RubyMine to reinstall gems it is using for the debugging in the remote environment

I have a project that I deployed to the docker container. Then I configured the remote debugging over ssh in the RubyMine and when I tried to debug the project for the 1st time it installed additional gems (ruby-debug-ide, debase, etc). Then deployed the project into a new container but RubyMine fails to debug new app running in that container b/c it gems are not present there. Is there a way to force RubyMine to reinstall those gems in a new container?

Here is the error I see in the RubyMine when trying to debug the project:

Testing started at 10:31 ...
/usr/local/bin/ruby: No such file or directory -- /root/.gem/ruby/2.6.0/gems/ruby-debug-ide-2.3.7/bin/rdebug-ide (LoadError)

Process finished with exit code 1
exit status 1```

Upvotes: 0

Views: 940

Answers (3)

Seeni
Seeni

Reputation: 1616

In my case, It was not able to detect that gem wasn't present in the remote environment just because my local had it. So, I had to delete gems on my local machine Library/Caches/JetBrains/RubyMine2022.3/ruby_stubs/256935961/home/ubuntu/.rvm/gems/ruby-3.1.4/gems/ruby-debug-ide-3.0.0.beta.6.1/ for the debugging to work again.

Upvotes: 0

niklaas
niklaas

Reputation: 93

For those wondering where the button for Synchronize Gems and RubyMine support files is in IntelliJ Ultimate, you can find it here:

Synchronize gems in IntelliJ Ultimate

I would have loved to add this as a comment to the existing answer, but it looks like I cannot upload images there.

Upvotes: 1

Rabodaber
Rabodaber

Reputation: 183

Could you, please, try following:

  1. Go to Settings | Languages and platforms | Ruby SDK and Gems
  2. Select your ssh Ruby SDK and select Synchronize Gems and RubyMine support files (down arrow icon above Gems list)
  3. After that try to debug your application again

Also, please take a look at our Tutorial: Docker as a remote interpreter https://www.jetbrains.com/help/ruby/using-docker-as-a-remote-interpreter.html

Upvotes: 0

Related Questions