gpt4 book ai didi

ruby-on-rails - 为什么我的 AptanaStudio3.0 无法调试 Rails 应用程序?

转载 作者:数据小太阳 更新时间:2023-10-29 07:53:53 24 4
gpt4 key购买 nike

这个问题我谷歌了将近一整天,还是没有答案。我的 ruby​​ 版本是 1.9.3,Rails 是 3.2.1,在 Mac 10.6 操作系统上。

现在我的 gem 列表是:

linecache19 (0.5.13)
ruby-debug-base19 (0.11.26)
ruby-debug-ide19 (0.4.12)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)

我想我拥有了我可能需要的所有东西,但调试器仍然无法在我的 AptanaStudio3 上运行。

当我调试一个 ruby​​ 程序时,我得到了这个错误:

Fast Debugger (ruby-debug-ide 0.4.9) listens on :51042
Exception in DebugThread loop: undefined method `is_binary_data?' for "Array (10 element(s))":String

当我调试 Rails 服务器时,我得到了这个错误:

Fast Debugger (ruby-debug-ide 0.4.9) listens on :51175
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:128:in `<module:Debugger>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:1:in `<top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:1:in `require_relative'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:1:in `<top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `require_relative'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `<top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `each'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:66:in `block in require'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `each'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:55:in `require'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0@global/gems/bundler-1.0.22/lib/bundler.rb:122:in `require'
/Users/Chris/workspace-aptana/RailsDemo/config/application.rb:7:in `<top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:53:in `require'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:53:in `block in <top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:50:in `tap'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.2.1/lib/rails/commands.rb:50:in `<top (required)>'
/Users/Chris/workspace-aptana/RailsDemo/script/rails:6:in `require'
/Users/Chris/workspace-aptana/RailsDemo/script/rails:6:in `<top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-ide19-0.4.12/lib/ruby-debug-ide.rb:123:in `debug_load'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-ide19-0.4.12/lib/ruby-debug-ide.rb:123:in `debug_program'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-ide19-0.4.12/bin/rdebug-ide:87:in `<top (required)>'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/bin/rdebug-ide:19:in `load'
/Users/Chris/.rvm/gems/ruby-1.9.3-p0/bin/rdebug-ide:19:in `<main>'
Uncaught exception: superclass mismatch for class RemoteInterface

任何人都可以提供帮助,非常感谢!

最佳答案

原来ruby-debug-ide和ruby-debug19玩的不好,是名字空间冲突的问题。要在 Aptana3 上进行调试(我的特定版本是 3.0.9),就是从 Gemfile 中删除对 ruby​​-debug19 的引用并运行:

bundle install

确保它也从 Gemfile.lock 文件中删除。

希望这对您有所帮助。

关于ruby-on-rails - 为什么我的 AptanaStudio3.0 无法调试 Rails 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9415217/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com