2

I just purchased my first Mac, a 13" Air with Lion, and am coming from Linux. I'm installed RVM and my first Ruby (1.8.6), but I can't get a gem to install. Here's the input:

Ryan's Air :sudo gem install rails --version 2.0.2
Password:********

and the result:

/usr/local/rvm/rubies/ruby-1.8.6-p420/lib/ruby/1.8/timeout.rb:59: [BUG] Bus Error
ruby 1.8.6 (2010-09-02) [i686-darwin11.2.0]

Ryan's Air :

Thanks in advance for any help on this.

Ryan

Ryan Clark
  • 764
  • 1
  • 8
  • 29
  • FYI, seems to be a Lion issue. I can reproduce the error on Lion, but not Snow Leopard. – Ryan Oct 30 '11 at 21:12
  • Just as a sanity check, I installed 1.9.2 and rails 3.1.1 without issue... It must be the native ruby libraries and or mysql... I'm embarrassed to say I really could use a hand cleaning that stuff out – Ryan Clark Oct 30 '11 at 21:31
  • 1
    Check out this question --- it's likely your lack of a gcc: http://stackoverflow.com/questions/6170813/why-cant-i-install-rails-on-lion-using-rvm – Jesse Wolgamott Oct 31 '11 at 01:15
  • I tried that and still receive the same error... – Ryan Clark Nov 01 '11 at 20:39

3 Answers3

4

The issue is with Lion, and I've encountered this myself on now 2 brand-new 13-inch MBP's.

What you need to do is install the OSX GCC Compilers separately.

They can be found here: https://github.com/kennethreitz/osx-gcc-installer (scroll down to downloading pre-build binaries)

After downloading and running through the package installer (you should not need to install Homebrew), you need to find where the GCC folder is located. For some people, it was in /usr/bin; however, for me I found it in /Developer/usr/bin

Add this directory to your $PATH variable in your ~/.profile or ~/.bash_profile file. For me, I'm using ~/.bash_profile and added it to the end using vim.

Close your Terminal and open it again, and then echo $PATH to make sure the changes saved.

Completely uninstall that version of ruby, and install again normally:

rvm install 1.8.7
rvm use 1.8.7

If it still doesn't work, I recommend installing your version of rails using the following command as Hans specified in Why can't I install Rails on Lion using RVM?:

CC=/usr/bin/gcc-4.2 rvm install ruby-1.8.7 --force

the CC directory would change based on where your install was. However, after adding the correct path to gcc to my $PATH variable, I did not need to do the above command.

If you were still having this problem, hope this helps.

Community
  • 1
  • 1
Steph Rose
  • 2,126
  • 3
  • 23
  • 35
0

Look at this article. It seems that you get deadlocks with your combination of old rails, sqlite and Webrick. Michael is right, try to use modern version of rails.

WarHog
  • 8,622
  • 2
  • 29
  • 23
  • I don't think this is deadlocks - I've read that article and the problem exhibits different behavior. Barring newer versions, is there any other advice for diagnosing this? – Ryan Clark Nov 01 '11 at 21:08
0
rvm install 1.8.7-head

This worked for me, everything else failed. I did not install the gcc specifically, just clean Xcode 4.2

Trausti Thor
  • 3,722
  • 31
  • 41