如何迫使红宝石重新安装它用于在偏远环境中调试的宝石
我有一个部署到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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试以下操作:
设置|语言和平台| Ruby SDK和GEMS
同步GEMS和Rubymine支持文件
(down and arrow Icon> GEMS列表上方),请再次查看在我们的教程:Docker作为远程解释器
https://www.jetbrains.com/帮助/ruby/使用docker-as-a-a-remote-interpreter.html
Could you, please, try following:
Settings | Languages and platforms | Ruby SDK and Gems
Synchronize Gems and RubyMine support files
(down arrow icon above Gems list)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
对于那些想知道
同步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:I would have loved to add this as a comment to the existing answer, but it looks like I cannot upload images there.
就我而言,它无法发现仅仅因为我的当地就有它而在远程环境中都不存在。
因此,我不得不在本地机器上删除宝石
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.