安装rubygems时出现此RVM错误。
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38: [BUG] Bus Error
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]
-- control frame ----------
c:0019 p:---- s:0074 b:0074 l:000073 d:000073 CFUNC :callcc
c:0018 p:0080 s:0071 b:0071 l:000a40 d:000a40 TOP /Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38
c:0017 p:---- s:0068 b:0068 l:000067 d:000067 FINISH
c:0016 p:---- s:0066 b:0066 l:000065 d:000065 CFUNC :require
c:0015 p:0053 s:0062 b:0062 l:0024b8 d:0024b8 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36
c:0014 p:0030 s:0055 b:0055 l:000998 d:000998 METHOD /Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard/rubygems/doc_manager.rb:5
c:0013 p:0080 s:0052 b:0052 l:0003e8 d:0003e8 METHOD /Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard/rubygems/doc_manager.rb:59
c:0012 p:0021 s:0049 b:0049 l:0000e8 d:0000e8 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/doc_manager.rb:116
c:0011 p:0037 s:0046 b:0046 l:0025f0 d:001a60 BLOCK /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:148
c:0010 p:---- s:0043 b:0043 l:000042 d:000042 FINISH
c:0009 p:---- s:0041 b:0041 l:000040 d:000040 CFUNC :each
c:0008 p:0200 s:0038 b:0038 l:0025f0 d:0025f0 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:147
c:0007 p:0076 s:0032 b:0032 l:0026a0 d:0026a0 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278
c:0006 p:0193 s:0028 b:0028 l:000010 d:000010 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147
c:0005 p:0013 s:0022 b:0022 l:000088 d:000088 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117
c:0004 p:0178 s:0017 b:0017 l:000110 d:000110 METHOD /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65
c:0003 p:0164 s:0009 b:0009 l:000aa8 d:001960 EVAL /Users/yannick/.rvm/rubies/ruby-1.9.2-p290/bin/gem:21
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000aa8 d:000aa8 TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/bin/gem:21:in `<main>'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:65:in `run'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:117:in `run'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:147:in `process_args'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:278:in `invoke'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:147:in `execute'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:147:in `each'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/commands/install_command.rb:148:in `block in execute'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/doc_manager.rb:116:in `generate_ri'
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard/rubygems/doc_manager.rb:59:in `install_ri_yard'
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard/rubygems/doc_manager.rb:5:in `load_yardoc'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/yannick/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38:in `<top (required)>'
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/yard-0.7.3/lib/yard.rb:38:in `callcc'
-- C level backtrace information -------------------------------------------
0 libruby.1.9.1.dylib 0x0000000109e384fe rb_vm_bugreport + 110
1 libruby.1.9.1.dylib 0x0000000109d2c513 report_bug + 259
2 libruby.1.9.1.dylib 0x0000000109d2c681 rb_bug + 161
3 libruby.1.9.1.dylib 0x0000000109dcef92 sigbus + 18
4 libsystem_c.dylib 0x00007fff89bbbcfa _sigtramp + 26
5 ??? 0x00007fff6992ec40 0x0 + 140734964624448
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
宝石安装得很好,但我不确定是否一切都井然有序。 有人有同样的问题吗?
答案 0 :(得分:4)
根据http://redmine.ruby-lang.org/issues/4651,它是Ruby中的一个问题,并在1.9.3中修复。
或者,您可以使用gcc,而不是 Apple的llvm-gcc重建ruby 1.9.2,这是XCode 4.x上的默认gcc。
如果你在构建Ruby之前犯了一个不幸的错误(像我一样)升级到XCode 4.2,你需要降级到XCode 4.1或安装GCC
如果你是Apple开发者,This gist有一个指向XCode 4.1安装程序的链接。否则你可以使用this installer安装GCC并将你的CC env变量设置为/Developer/usr/bin/i686-apple-darwin11-gcc-4.2.1(你可能还想将$ CXX设置为i686-apple -darwin11-g ++ - 4.2.1如果你使用带有C ++外部的Gems。)
答案 1 :(得分:1)
如果你得到osx,只需从https://github.com/kennethreitz/osx-gcc-installer.git安装gcc即可 我建议你使用rbenv,不要破解你的CD ...我从rvm离开到rbenv,我感觉更好:D
以下是步骤: 只需安装它:https://github.com/sstephenson/rbenv 然后安装你的ruby版本:rbenv install 1.9.2-p290 选择您的全球版本:rbenv global 1.9.2-p290
如果您需要项目中的特定版本: cd~ / myproject; rbenv安装1.9.3-p0; rbenv local 1.9.3-p0;
就是这样!