BUG ruby ​​1.8.7 bus error

I get 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 stone, 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 that Xcode 4.2, RVM is installed with Ruby 1.8.7, 1.9.x installed and everything works fine.

+15
ruby rubygems
Oct. 12 '11 at 1:30
source share
7 answers

Since I had to parse some of these answers to get it working with Xcode 4.2, I thought that I would put all this together:

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

+24
Oct 19 '11 at 23:00
source share

So nuking RVM ( rvm implode ) and reinstallation didn't matter. I finished installing Xcode 4.2 and then installed the GCC compilers, after which I override the Xcode compilers.

Here are the steps for these googling.

+3
Oct. 12 '11 at 1:37 a.m.
source share

Several articles suggest that Ruby doesn't like compiling with LLVM. A stop measure is to carefully remove the RVM installation - related articles say how - and then recompile Ruby with simple GCC. The real fix should come from Apple / LLVM or the Ruby team.

+2
12 Oct '11 at 1:45
source share

I fix it on

  • Xcode 4.2.x installation,
  • adding export CC=gcc to ~ / .bash_profile,
  • reload environment ( source ~/.bash_profile ),
  • execution of rvm install 1.9.3 ,
  • execution of rvm ruby-1.9.3-rc1 ,
  • doing gem update --system and finally
  • Running gem install bundler

The problem is version Xcode 4.2.x. If you run rvm get head , you will see this message "DO NOT use Xcode Version 4.2.x. At present, it cannot create several rubies and gems ...".

I have no solution for ruby ​​v1.8.7.

Hope this helps.

+2
Oct. 15 '11 at 9:32 a.m.
source share

I need to use Xcode on this machine, so standalone gcc was not going to do this for me.

On other posters, I followed the suggestions at the end of the RVM update release notes.

Note. I did not need to remove the RVM. I managed to uninstall Xcode 4.2.1 (completely) and reinstall Xcode 4.1, and then do the trick CC=/usr/bin/gcc-4.2 rvm install 1.8.7 . In my case, I put export CC="/usr/bin/gcc-4.2" in my profile in order to preserve some typing, as well as configure various gems.

It also worked on Ruby Enterprise Edition (ree-1.8.7-2011.03), which also failed.

+1
Nov 29 '11 at
source share

You can download the GCC installer manual for self-installation here: https://github.com/kennethreitz/osx-gcc-installer

This gives you gcc installation without llvm without having to mess with Xcode.

Then you can use the command

  export CC=/usr/bin/gcc-4.2 

This allows you to have the latest X code for OSX and still have a happy version of gcc for ruby.

+1
Jan 14 '12 at 18:50
source share

The rvm post-installation documentation says:

** Lion Users: DO NOT use Xcode Version 4.2.x for OS X Lion. Currently, he cannot create several rubies and precious stones, as well as several packages of Homebrew and Macports. Xcode Version 4.1 (4B110) works. You can find Xcode 4.1 for OS X Lion: https://developer.apple.com/downloads/download.action?path=Developer_Tools/xcode_4.1_for_lion/xcode_4.1_for_lion.dmg

It worked for me.

0
Oct 26 '11 at 4:44
source share



All Articles