我以某种方式破坏了我的ruby配置,我不确定如何修复它。这是一个irb会议:
>> require 'ruby-debug'
LoadError: dlsym(0x101a272d0, Init_ruby_debug): symbol not found - /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.bundle
from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.bundle
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:1
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug.rb:5
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):1
这是我的红宝石版本:
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10]
我不确定如何诊断和解决这个问题。有什么建议?我应该提供哪些其他信息?
重新安装gem并没有解决它:
$ sudo gem install ruby-debug
Password:
Successfully installed ruby-debug-0.10.3
1 gem installed
Installing ri documentation for ruby-debug-0.10.3...
Installing RDoc documentation for ruby-debug-0.10.3...
答案 0 :(得分:0)
也许它缺少一些依赖.so文件?我会使用ldd -l在linux中确定这个,dunno关于mac。
答案 1 :(得分:0)
通过rvm重新安装1.8.7为我解决了这个问题。