RoR-e

If you haven't seen The 15 minute E-Commerce Site CLICK HERE


I'm currently looking for Contract jobs, Contact Me if you are interested. Dave.

Ruby Developers Upgrading to Lion David Henner Aug 20

6 comments Latest by Mikey Donuts

Well I pulled the trigger and upgraded to Lion. The new Mac operating system has a whole bunch of new features. Airdrop lets you share files over a wireless connection. The new gestures will make people that weren't a fan of spaces have a change of heart. Personally I loved the way spaces were setup but I can see how Lion's gestures will be more universally Loved.

Connecting to the app store actually has been made dead simple. At first I would have thought this as a bad thing. Luckily, it's also much easier to get great free apps. I'm actually a fan.

The downside... My day-job requires me to develop software. So I want to my git repo and typed "bundle install". BANG!!!

At first I realized I just upgraded ruby's patch-level in rvm. So I needed to run "gem install bundler". After running bundle install again I got an error like this:

Installing rmagick (2.13.1) with native extensions /Users/davidhenner/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /Users/davidhenner/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... yes
checking for ImageMagick version >= 6.4.9... yes
checking for HDRI disabled version of ImageMagick... yes
checking for stdint.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Well it looked like ImageMagick had issues. I assumed it was either gone or needed an update. I typed brew install imagemagick and it looked like imagemagick was indeed installed.

Warning: Formula already installed: imagemagick

The next step was to update homebrew:

davidhenner$ brew update

error: pathspec 'master' did not match any file(s) known to git.
Error: Failure while executing: git checkout -q master 

OK, this looked simple enough. All I needed to do was go to the git repo at /usr/local/.git and remove the folder (rm -rf /usr/local/.git) and remove the .gitignore file. Then I ran "brew update" again. BANG!!!

error: Untracked working tree file 'Library/Aliases/0mq' would be overwritten by merge.

Error: Failed while executing git pull http://github.com/mxcl/homebrew.git master

Hmmm lets try "brew update" again. BANG...

error: The following untracked working tree files would be overwritten by checkout:
    Library/Aliases/0mq
    Library/Aliases/Secret Rabbit Code
    Library/Aliases/alut
    Library/Aliases/android
    Library/Aliases/apache-activemq
    Library/Aliases/apache-fop
    Library/Aliases/aws-as
    .
    .
    .
        Library/Formula/app-engine-java-sdk.rb
    Library/Formula/appswitch.r
Aborting
Error: Failure while executing: git checkout -q master

OUCH!!! The message was much longer. Then I learned many people just uninstalled homebrew. After a fresh install everything works. So I found out to uninstall homebrew here.

cd `brew --prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew

That worked... Now I just needed to head over to the homebrew github account a get a fresh install. I did need to get the java developer Updates before running the script.

I ran "brew install imagemagick" and everything worked. Then I went over to my repo. I ran bundle install and everything works.

I hope this saves someone some time. Good Luck.


ror_ecommerce, ruby on rails ecommerce done right

6 comments so far

Iain 21 Aug 11

I'm considering downgrading to Snow Leopard again. I also did a clean install, but I still have a lot of beach balls and kernel panics.

Ciaran Lee 21 Aug 11

I had the same problem. Manually uninstalling and reinstalling just ImageMagick works too.

Andy Jeffries 21 Aug 11

I upgraded to OS X Lion and everything worked fine (except for Sparrow which was fixed shortly thereafter) - no issues at all with ImageMagick, Homebrew, Rails

Ken Collins 21 Aug 11

LOL, This is one of the reason I still use MacPorts, the fact that everything in it is sandboxed to what it compiles and never links against OS X binaries is a lesson MacPorts learned long ago to do. Sure you can compile some things in Homebrew faster, but it comes at a portability cost. You could make the argument that you do not upgrade major OS versions that often, but philosophically, linking to a known quantity in a silo'd port system is something I highly subscribe too. FWIW, anytime you upgrade major OS versions, it is always better to recompile things in your port system. This is why I like MacPorts too. Just simply delete the /opt directory start over.

Tanel Suurhans 22 Aug 11

This is certainly odd. I upgraded from SL to Lion a while ago, and had zero issues with brew or IMagick. The only thing not working was MySQL (due to a bug in either OSX libs or MySQL libs).

Mikey Donuts 22 Aug 11

My story is the same as the authors but replace imagemagick with oracle instant client and the ruby oci8 gem. No current fix is in place, no word yet I don't think from apple or oracle. Fixed with fresh install of Snow Leopard. Wasted a solid 20 hours upgrading, flailing, and finally restoring. Last week was awesome.

Comments are closed