如何迫使红宝石重新安装它用于在偏远环境中调试的宝石

发布于 2025-02-13 12:29:41 字数 442 浏览 0 评论 0原文

我有一个部署到Docker容器的项目。然后,我在Rubymine中的SSH上配置了远程调试,当我尝试以第一次安装其他宝石(Ruby-Debug-ide,Depase等)进行调试时。然后将项目部署到一个新的容器中,但是Rubymine无法调试在该容器B/C中运行的新应用程序,该应用程序不存在该宝石。有没有办法强制红宝石将这些宝石重新安装在新容器中?

这是我在尝试调试项目时在红宝石中看到的错误:

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```

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```

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

守不住的情 2025-02-20 12:29:43

您可以尝试以下操作:

  1. 转到设置|语言和平台| Ruby SDK和GEMS
  2. 选择您的SSH Ruby SDK,然后选择同步GEMS和Rubymine支持文件(down and arrow Icon> GEMS列表上方)
  3. 之后,请再次尝试再次调试您的应用程序

,请再次查看在我们的教程:Docker作为远程解释器
https://www.jetbrains.com/帮助/ruby/使用docker-as-a-a-remote-interpreter.html

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

枫以 2025-02-20 12:29:43

对于那些想知道同步GEMS和Rubymine支持文件的按钮在哪里,您可以在Intellij Ultimate中找到它:

“

我很想将其作为评论中的评论,但看起来我无法在那里上传图像。

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.

我一向站在原地 2025-02-20 12:29:43

就我而言,它无法发现仅仅因为我的当地就有它而在远程环境中都不存在。
因此,我不得不在本地机器上删除宝石library/caches/jetbrains/rubymine2022.3/ruby_stubs/256935961/home/home/ubuntu/.rvm/gems/ruby-3.1.1.4/ruby-debug-debug-iide -3.0.0.beta.6.1/,用于调试再次工作。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文