Rubygems Do Not Install on Os X Lion

RubyGems issue on OS X Lion

Update gems

gem update --system
gem update

Check Gemfile in your rails application. Should content: gem "selenium-webdriver", "~> 2.22.0"

Run bundle install again.

gem install pg doesn't work on OSX Lion

I finally found the cause of the problem! Though I am still uncertain how this problem came about.

Look at the contents of the mkmf.log file that is created when my install command fails (see my original post). It logs an attempt to run the following command

/usr/bin/gcc-4.2 ...and so on...

There is no /usr/bin/gcc-4.2 on my system. There is a gcc, which is symbolically linked to llvm-gcc-4.2. My solution was to create another symbolic link

sudo ln -s llvm-gcc-4.2 gcc-4.2 

After making this link, my gem install pg command worked without any problems.

I found the solution to this problem on the Frozen Canuck blog in the post Error Installing Ruby Gem with C Extension. He speculates that the problem can be caused by conflicting versions of XCode. whatever the cause, my eternal thanks!

I can't install Ruby Gem 'curb' on Mac OS Lion

Since XCode4 doesn't use gcc-4.2 there are many libraries fail to be installed.

You have to install XCode3, from a developer centre, and it will create for you gcc-4.2.

How to do that:

  1. Register as an developer (free)
  2. Download and make sure you really installed XCode3
  3. Check gcc-4.2 file

Good luck

Who can help me install and get RubyGems working on Mac OS X Lion?

Installing Command Line Tools from Xcode > Preferences > Downloads solved the problem, and I can now use RubyGems and Ruby on Rails.

Can't install RubyZip gem on OS X Lion with RVM

I'm really not sure what caused this, but I managed to fix it by doing the following.

Since reinstalling Ruby 1.9.2 didn't help, I decided to be even more drastical and went down to rvm. I found out that I had version 1.1.something installed, which is about 9 months old.

I tried to update, but it didn't help, so rvm implode did the trick. I even had to sudo rm -rf ~/.rvm, probably because I managed to mess up some gem installs by adding sudo to them.

After reinstalling rvm and reinstalling 1.9.2, it seems like everything is working fine now, even with Xcode 4.2.

Lesson learned, rm -rf & reinstall is better than trying to upgrade from a year old version :)

Mac OSx Lion - Cannot get RoR installed

I believe my issue is due to the fact RubyGem does not add 'rails' to the $PATH environment variable. I was able to get everything working by installing RVM and using it to update my default Ruby and install Rails

How do I get gem install to work on OS X Lion with Ruby 1.8.7 without seg faulting?

Make sure your rvm is up to date: rvm get latest

And then run this: rvm uninstall 1.8.7 && CC=/usr/bin/gcc-4.2 rvm install 1.8.7

Basically you must tell rvm which gcc compiler to use (CC=/usr/bin/gcc-4.2)

Then you should be able to install the pg gem as normal.



Related Topics



Leave a reply



Submit