Skip to main content

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

    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 :)
    Eduludi said…
    brew uninstall imagmagick should be brew uninstall imagemagick
    Adam Bair said…
    You could also try:

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

    As it might save you a few mins...

    Popular posts from this blog

    Car or Auto Make-Model-Year Database : For Breakfast

    Make Model What? If you like me were tasked with loading a database of recent car makes/models/years, you would start by looking on the web and seeing if someone else just has it out there, readily available, hopefully for free, but perhaps for a tiny nominal fee.? If only it was that simple... I looked and looked, and couldn't find anything that would fit the above requirements. So I thought, who would know about US car models better than Kelly Blue Book? So I went on their site, and sure enough they have a javascript file that lists all known to them makes and models of used cars. Since the file is public, I figured it's not really "evil" if I scrape and parse it for my own benefit. Disagree? Have a better source? Then leave a comment. Anyway, to cut the long story short, I'm hoping to save a day or so to someone else who may, like me, be looking for this information. The ruby module shown below retrieves and parses the javascript from KBB site into

    Mac OS-X tips: How to run SSHD on an alternative port

    This tip falls into one of those "I had to spend more than 10 minutes looking for an answer" category, so it's a worthwhile subject for a quick blog post. Why Run SSH? Running SSH on Mac OS-X allows you to login to your machine remotely, and also copy file securely via SCP command to and from your Mac OS-X host. But I am behind my own $50 router/firewall. Can I still connect to my computer from outiside? Yes. Most off the shelf routers and firewalls will allow you to do two things that are needed for this: Assign a permanent IP address to your Mac on a local network (see your router documentation for more details) Create a port forwarding rule on your router. Eg - any request to port 22 on your external IP (provided by your router) can be routed to the specific IP address of your Mac. Exact specifics on this configuration are once again available in your router documentation. Most off the shelf routers support this, including basic Netgear and D-Link.

    Ruby on Rails Hosting: From HostingRails to RailsMachine in a shake of a tail

    Rails hosting is a hot subject, and with everyone asking everyone else about their experience, I thought its only fair to share my own experience, even though it is relatively limited. Introduction I started with a shared "professional" hosting plan from HostingRails . It was around $30/month, and included non-root SSH access to a shared server, and additional 150Mb of RAM for total of 200Mb (although that's actually quite misleading, see below). I stayed on this plan for about 3-4 months, and then decided to switch to a virtual hosting plan from RailsMachine - their single server plan, for about $100/month (that includes dedicated 384Mb of RAM and a root access to my virtual server). This post describes the reasons behind switching, and compares pros and cons of each hosting plan. Our needs included the following setup: One application running in two instances (one production, and one test) Two-mongrel instances per application (so total of 4 mongrels) C