04 August 2011

Installing Lion overtop of Snow Leopard on my development laptop has been pretty painless, with a few exceptions. One was Git - the path Git's executable was removed from bash (I didn't check other shells). This was easily solved by adding PATH=/usr/local/git/bin:$PATH to my bashrc.


Another issue was Xcode and the development tools (i.e. gcc) that it brings along. Something was wrong when Ruby gems with native extensions refused to compile:

> gem install nokogiri --no-ri --no-rdoc
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.

This line printed in the gemmake.out file:

checking for libxml/parser.h... *** extconf.rb failed ***

I tried downloading some 'usual suspect' libraries:

> brew install readline wget
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/rubygems/
custom
require.rb:31: command not found: /usr/bin/xcode-select -print-path Warning: Xcode is not installed! Builds may fail!

Formula already installed: /usr/local/Cellar/readline/6.1

Xcode not installed? That was strange, since the Xcode 3.2.3 application started up fine through the GUI. I decided to move Xcode 3.2.3 to a temporary directory and install Xcode 4.1 from the App Store. Everything went smoothly. Xcode will detect an old version of Xcode and put it in a directory called "Developer-old" - see the image below. I recommend installing Xcode 4 if you run into similar problems; you shouldn't run into trouble. //



blog comments powered by Disqus Back

Ustreet


Peter Kong is a
software engineer.