Thursday, July 26, 2012

Getting RMagic and friends to work on OS-X Mountain Lion

Upgraded my ruby environment today to Mountain Lion.

Here is a quick checklist that I went through to get everything working.  The largest change was having to reinstall XCode and command line tools, and also download XQuarts in order to reinstall ImageMagick successfully. Without it, I was getting errors building RMagick of the following shape:

ld: file not found: /usr/lib/libltdl.7.dylib for architecture x86_64clang:
error: linker command failed with exit code 1
(use -v to see invocation)
make: *** [RMagick2.bundle] Error 1


Quick checklist:
  1. Install Mountain Lion
  2. Install XCode 4.4
  3. Install command line tools from XCode 4.4 Preferences dialog
  4. Install XQuartz
  5. In terminal run
    1. brew update
    2. brew uninstall imagemagick
    3. brew install --fresh imagemagick
    4. wipe out your ~/.rvm folder
    5. reinstall RVM and install the latest ruby 1.9.3-p-194
  6. run "bundle" in the project folder
  7. run "rake" and rejoice

References:

https://github.com/mroth/lolcommits/issues/65

    8 comments:

    barry said...

    Thanks man! I was about to tack down the creator of rmagick and strangle him! This was much simpler.

    zedtux said...

    You've forgot a "e" in the uninstall line, and you don't need to delete the ~/.rvm folder!!

    Wasim said...

    Thanks alog :)

    Wasim said...

    Thank you :)

    Eduludi said...

    brew uninstall imagmagick should be brew uninstall imagemagick

    Fashionate said...

    Thank you!!! = )

    Fashionate said...

    Thank you!!! = )

    Adam Bair said...

    You could also try:

    brew install libtool --universal
    brew link libtool --force

    As it might save you a few mins...