2010-08-06 32 views
1

我已經破壞了我的ruby配置,我不知道如何解決它。下面是一個IRB會議:需要'ruby-debug'LoadError:找不到符號

>> 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] 

我不知道如何去診斷和修復此。有什麼建議麼?我應該提供哪些其他信息?

重新安裝寶石沒有解決它:

$ 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

您是否嘗試卸載寶石,然後安裝寶石? – 2010-08-06 13:37:50

+0

我沒有。我正在嘗試通過rvm安裝新鮮的紅寶石1.8.7 ... – cduhn 2010-08-06 14:42:48

+0

卸載/重新安裝沒有解決它,但通過rvm新鮮的1.8.7安裝工作。 – cduhn 2010-08-06 14:47:48

回答

0

通過rvm重新安裝1.8.7爲我解決了這個問題。

0

也許它缺少一些依賴.so文件?我會用ldd -l在linux中確定這個,不知道mac。