问题描述
可能的重复:
ruby-debug 与 Ruby 1.9.3?
我听说 ruby 1.9.3p125 有解决 ruby-debug19 问题的方法,所以按照 RVM 站点上的说明,我重新安装了 1.9.3:
I had heard rumors that ruby 1.9.3p125 has a solution for the ruby-debug19 problem, so per instructions on the RVM site, I reinstalled 1.9.3:
$ rvm reinstall 1.9.3 --patch debug --force-autoconf
$ ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.2.0]
那么:
gem install ruby-debug19
将此条目添加到我的 Gemfile:
Added this entry to my Gemfile:
gem 'ruby-debug19'
那么:
$ rails server -u
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Exiting
为了克服这个错误,我将 Gemfile 条目更改为:
To get past this error I changed my Gemfile entry to:
gem 'ruby-debug19', :require => 'ruby-debug'
现在来自服务器的新错误:
Now a new error from the server:
/Users/don/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': dlopen(/Users/don/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle, 9): Symbol not found: _ruby_threadptr_data_type (LoadError)
Referenced from: /Users/don/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle
Expected in: flat namespace
in /Users/don/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle - /Users/don/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.bundle
我对数百篇关于如何处理这个 ruby-debug19 问题的帖子感到非常困惑.我希望它已经解决了.显然不是.有什么建议么?(如果有人建议补丁,请提供有关如何应用它的分步说明.我过去一直在努力解决补丁.)
I'm very confused by the hundreds of posts out there on how to handle this ruby-debug19 issue. I was hoping it had been solved. Apparently not. Any suggestions? (If anyone suggests a patch, please provide step by step instructions on how to apply it. I've struggled with patches in the past.)
推荐答案
ruby-debug 的一个分支,称为调试器"现在存在包含人们在 ruby-debug19 之上部署的许多修复程序,因此您应该能够将 Gemfile 更改为
A fork of ruby-debug just called 'debugger' now exists that incorporates many of the fixes people had been deploying on top of ruby-debug19, so you should be able to just change your Gemfile to
gem 'debugger'
...然后你走吧.
这篇关于Rails 3.1 和 Ruby 1.9.3p125:ruby-debug19 仍然崩溃,“Symbol not found: _ruby_threadptr_data_type"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!