Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 从IntelliJ在Docker中远程调试JRuby_Ruby On Rails_Ruby_Debugging_Intellij Idea_Remote Debugging - Fatal编程技术网

Ruby on rails 从IntelliJ在Docker中远程调试JRuby

Ruby on rails 从IntelliJ在Docker中远程调试JRuby,ruby-on-rails,ruby,debugging,intellij-idea,remote-debugging,Ruby On Rails,Ruby,Debugging,Intellij Idea,Remote Debugging,我有一个RubyonRails(JRuby)项目在PumaWeb服务器中运行,该服务器在本地Docker容器中运行。我正在尝试使用Ruby远程配置从运行在同一主机上的IntelliJ调试应用程序 在我的应用程序Gems之外,我向测试/开发组添加了以下内容: gem 'ruby-debug-base' gem 'ruby-debug-ide' 当我通过启动脚本在Docker容器内运行该命令时,我正在使用以下命令: exec bundle exec rdebug-ide --host 0.0.0.

我有一个RubyonRails(JRuby)项目在PumaWeb服务器中运行,该服务器在本地Docker容器中运行。我正在尝试使用Ruby远程配置从运行在同一主机上的IntelliJ调试应用程序

在我的应用程序Gems之外,我向测试/开发组添加了以下内容:

gem 'ruby-debug-base'
gem 'ruby-debug-ide'
当我通过启动脚本在Docker容器内运行该命令时,我正在使用以下命令:

exec bundle exec rdebug-ide --host 0.0.0.0 --port 1234 --dispatcher-port 26162 -- /usr/local/bundle/gems/puma-3.5.2-java/bin/puma -C /var/www/apps/app1/config/puma.rb
当我启动容器时,我得到如下输出,看起来调试器启动正确:

Fast Debugger (ruby-debug-ide 0.6.0, ruby-debug-base 0.10.3.2, file filtering is not supported) listens on 0.0.0.0:1234
当我在IntelliJ中运行远程调试时,它似乎在那个时候启动了Puma,然后它失败了,似乎是冲突或调用
listen
gem(我正在使用listen'~>3.1.5')。我看到了这个输出,因为它似乎不支持这个事件

Puma starting in single mode...
* Version 3.5.2 (jruby 9.1.2.0 - ruby 2.3.0), codename: Amateur Raccoon Rocketry
* Min threads: 0, max threads: 16
* Environment: development
Exception in thread "Ruby-0-Thread-2: /usr/local/bundle/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb:6" java.lang.IllegalArgumentException: unknown event type: thread-begin
     at org.jruby.debug.Util.typeForEvent(Util.java:122)
     at org.jruby.debug.DebugEventHook.eventHandler(DebugEventHook.java:97)
     at org.jruby.runtime.EventHook.event(EventHook.java:30)
     at org.jruby.Ruby.callEventHooks(Ruby.java:3231)
     at org.jruby.runtime.ThreadContext.trace(ThreadContext.java:641)
     at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:103)
     at java.lang.Thread.run(Thread.java:745)
Exception in thread "Ruby-0-Thread-3: /usr/local/bundle/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb:6" java.lang.IllegalArgumentException: unknown event type: thread-begin
     at org.jruby.debug.Util.typeForEvent(Util.java:122)
     at org.jruby.debug.DebugEventHook.eventHandler(DebugEventHook.java:97)
     at org.jruby.runtime.EventHook.event(EventHook.java:30)
     at org.jruby.Ruby.callEventHooks(Ruby.java:3231)
     at org.jruby.runtime.ThreadContext.trace(ThreadContext.java:641)
     at org.jruby.internal.runtime.RubyRunnable.run(RubyRunnable.java:103)
     at java.lang.Thread.run(Thread.java:745)
! Unable to load application: Timeout::Error: execution expired
Timeout::Error: execution expired
我尝试过不同的版本,无论我尝试什么,我似乎得到了同样的东西。Ruby远程调试是否有限制,这是否与
listen
gem不兼容


我正在使用Puma 3.5.2(平台:jruby)、Listen 3.1.5、Ruby 2.3.1p112、jruby 9.1.2.0和Ruby 2.3.0。我也在运行LinuxMint的VirtualBox虚拟机上运行,如果这有什么区别的话。我对来自Java背景的RubyonRails比较陌生,所以这可能是我缺少的一个新手

所以我去掉了
监听器
gem,并注释掉了
config.file\u watcher=ActiveSupport::EventedFileUpdateChecker
,为了摆脱这种依赖性,现在我运行了,我得到了相同的错误,但来自Puma。前面的注释似乎指向JRuby本身,有什么想法吗?JRuby Util.java肯定不包括“线程启动”。在这一点上,我是否使用了正确的调试库?因此,我去掉了
侦听器
gem,并注释掉了
config.file\u watcher=ActiveSupport::EventedFileUpdateChecker
。为了摆脱这种依赖关系,现在我运行时得到了相同的错误,但来自Puma。前面的注释似乎指向JRuby本身,有什么想法吗?JRuby Util.java肯定不包括“线程启动”。在这一点上,我是否使用了正确的调试库?