我在使用Visual Studio Code使用Ruby Debug IDE运行Rails 4应用程序时遇到问题。这是我得到的错误。
/home/ziyan/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing'
: undefined method `this' for #<Gem::Specification:0x1271b08 debase-0.2.1> (NoMethodError)
from /home/ziyan/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /home/ziyan/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/gems/debase-0.2.1/lib/debase.rb:4:in `<top (required)>'
from /home/ziyan/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /home/ziyan/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /home/ziyan/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `require_relative'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide:8:in `<top (required)>'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/bin/rdebug-ide:23:in `load'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/bin/rdebug-ide:23:in `<main>'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/bin/ruby_executable_hooks:15:in `eval'
from /home/ziyan/.rvm/gems/ruby-2.3.0@tbv_website/bin/ruby_executable_hooks:15:in `<main>'
没有成功
我启动了一个新的Rails 5 + Ruby 2.4.0项目,调试工作正常。它使用相同的ruby-debug-ide版本。所以ruby-debug-ide的版本应该正常工作。
答案 0 :(得分:2)
我刚刚通过将rubygems更新到2.6.11版本来解决了这个问题(我认为它是截至今天的最新版本)。
$ gem update --system
现在在VSCode中调试再次工作。
我当前的配置。
我希望这会对你有所帮助。