Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
615 views
in Technique[技术] by (71.8m points)

rubygems - BUG Bus Error ruby 1.8.7

I'm getting an error after compiling Ruby 1.8.7 using RVM on Lion 10.7.1 with Xcode 4.2 GM (new MacBook).

It compiles fine but when I try to install any gem I get the following:

gem install bundler
/Users/me/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/timeout.rb:60: [BUG] Bus Error
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin11.1.0]

Abort trap: 6

Update: In the end I hope to have Xcode 4.2 installed, RVM with Ruby 1.8.7, 1.9.x installed and all working properly.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Since I had to parse through several of these answers to get things working with XCode 4.2, I thought I'd put it all together:

  1. Install Xcode 4.2
  2. Install the gcc standalone compiler from https://github.com/kennethreitz/osx-gcc-installer (which replaces Xcode)
  3. Add export CC=gcc-4.2 to your ~/.bash_profile or equivalent (don't forget to reload it)
  4. Run rvm implode" then re-install rvm http://beginrescueend.com/

At this point I was able to rvm install ruby-1.8.7 (and ruby-1.9.2), and actually get my gems to install.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...