The Magic Words for RMagick
Apr 13, 2008 23:41

A number of the Rails applications I've been working on lately do some image processing - and they require the RMagick gem, which uses the command-line ImageMagick tools.

Getting RMagick, ImageMagick, and all of their dependencies downloaded, installed, and running correctly on OS X has generally been a headache - the exception to the rule that Rails and OS X 'just work'.

I spent several days back in 2006 getting RMagick working, and recently spent an afternoon redoing everything when I upgraded to Leopard and all of the Ruby gems got 'helpfully' moved for me.

I've also just upgraded from my somewhat worn out PowerBook G4 to a new Core 2 Duo MacBook Pro - and of course RMagick doesn't work again. So instead of doing several hours of billable work and making actual money, I got to poke around the depths of my system and do a lot of Googling to get things back to the way they were before.

This time it only took about two hours - only! - and here are some helpful hints if you're wrestling with RMagick on an upgrade from PPC to Intel on Leopard:

  • If you've already got a non-functional version of ImageMagick / RMagick on your system, the magic one-click 'rm_install' script won't work. Instead, you'll need to do some typing and copy-and-pasting from this handy article. Note that instead of 'wget' you might need to use 'curl -O' instead. Also instead of 'make' you'll want to do 'sudo make' in most cases. Your mileage may vary depending on if you have a separate admin user or not (I do). Some of the urls used for getting the libraries are obselete now, but you can google for the filenames and find an alternate source pretty easily. Once you've downloaded the original archives, don't delete them! - since you'll probably need to do the installation again at some point and it's easier to just delete the install directories and re-expand the archives than it would be to hunt them all down again.

  • The last line in the script is 'sudo gem install RMagick' - this is wrong. You actually want to follow Greg's advice and type 'sudo su - ' to get root, and then type the magic (without the stupid 'k') incantation:

ARCHFLAGS='-arch i386' gem install rmagic

That seems to work. If it doesn't, block off another few hours and try again!

I find it amazing that the transition from G4 to Intel was almost completely seamless - all my data and configuration copied over a few hours with a Firewire cable. Almost all of the software worked perfectly without any hassle, even though the entire architecture underneath had changed. Making the transition that invisible is actually very difficult - and it's a tribute to Apple that it was almost invisible. Things like RMagick remind us of how messy software can usually be.

Hopefully the latest round of upgrades has ended for a while and I can actually get some work done for a change.

Jennifer from Operations
Apr 09, 2008 09:30
Startup Stars? I'm so bored!
Apr 25, 2008 10:24
Other Blog Posts
My Expanded Twitter Thread about BurgerWeek 2021 This Is Nowhere: The Server Side Building a React Native App Without Tears - Part 3 Building a React Native App Without Tears - Part 2 Building a React Native App Without Tears (Mostly) This Is Nowhere: The Memento Edition This Is Nowhere: Aspects of Accessibility Presentations About NowHere This Is Nowhere: Head-First Into React Native This Is Nowhere: Bloomsday Halifax This Is Nowhere: Why an HTML/JavaScript Single-Page App With GPS Is A Bad Idea This Is Nowhere: GPS and Wayfinding and More UX This Is Nowhere: The Single-Button UX This Is Nowhere: Don’t Just Stand There! This Is Nowhere: Finding My Duck Finding Burgers Fast: My DIY Halifax Burger Week Site "This is Nowhere" at PodCamp Halifax 2018 The Diary Diaries: Fixing Remembary's Facebook Connection Special Leap Day Edition of "Some Weird Things About Time" What's Up With Remembary Can't get pg_dump To Work Now That Heroku Has Upgraded Postgresql to 9.4? The Best Thing I Ever Did To Promote My App If You Build It, They WON'T Come #deployaday, My Big Hairy Plan for 2015 Extracting Plain Text from an NSAttributedString My Year of "Hits" Part 2: Remembary Rolling My Year of "Hits" Part 1: Remembary Rises (and Stumbles) Handy Little Test Method to Check for Translations in Rails Apps My Suddenly Slow-Waking MacBook Air Indie App PR: Keeping Control of Your Tone A Quick Note on 'clone' in Rails 3.2 My eBook Apps 2: iOS, JavaScript, and Ruby My eBook Apps 1: Introduction Quick Tip: No Sound on Mountain Lion My Upcoming Talk at PodcampHFX 2012: My Year of "Hits" Building at the Speed of Funny Screencast Tips Remembary's Cool New Picture Support Indie App PR 2: Keeping On Top Of User Feedback Indie App PR 1: How to Handle an App Disaster Giles Bowkett Diary Project 2 Remembary Video Congratulations! Welcome to Your Nightmare! How My iPad App Remembary Took Off Why You Should Have an App in the App Store (Even If You Probably Won't Make Any Money) PodCampHFX Remembary Presentation - Part 3 How I Used MailChimp Autoresponders to Promote Remembary PodCampHFX Remembary Presentation Part 2 PodCampHFX Remembary Presentation Part 1 Why AdWords Ads Don't Work for iPad Apps Remembary is Sponsoring PodcampHFX Why Can't I Resize my Views in Interface Builder? Momento and Remembary Concerning Remembary iPad-Friendly eBooks of Gracian's Art of Worldly Wisdom Project Report: PTOS2 A Quick Note on Encryption We're all LUsers Thoughts on HAML Friday Afternoon Hack - Getting Beyond the Basics Halifax Friday Hack and Back to Basics Quote from Wil Shipley FutureRuby Make Web Not War Busy Week I: Toronto Ruby Job Fair Employment.nil - the Toronto Ruby Job Fair Code Count: Ruby on Rails vs. C#/ASP.NET A Brief Note on Twitter The Hub Halifax and Mobile Tech for Social Change Deep Thoughts on Microsoft From The Accordion Guy The Two Kinds of Defensive Programming Presentation - Fixing Careerious: From C#/.NET to Ruby on Rails Enterprise! Presenting at Ruby on Rails Project Night - May 7th New Name and New Look for Careerious/Clearfit FutureRuby and More From Unspace Health Tips for Programmers This tables meme won't die Careerious - Ruby and Rails vs. C#/.NET Yeah I Use Tables For Layout, So Sue Me The Different Kinds of Done Giles Bowkett's RubyFringe presentation OfficeTime: Great Time-Tracking App for OS X Back With A New Look Non-DRY Feed torontorb Keeping Your Sanity With The Command Design Pattern shindigital Is All Grown Up! (according to the spambots) Startup Stars? I'm so bored! The Magic Words for RMagick Jennifer from Operations You see? Naming is HARD Business Software as Process Documentation Deployment note: 'execve failed' Steve Jobs on Market Research Why Canada Is Better for Entrepreneurs "Program first and blog second" Toronto Tech Collage The MacBook Air Is A Roadster RubyFringe! Quote of the Week: Steve Yegge Starting Up: Cards Great design tool: Starting Up: The Logo Quotes Of The Day: Hedge Fund Interview TSOT Ruby / Rails Presentation Night - Part 1 Moneyworks: Accounting Software for Canadians on OS X Starting Up: The Name Nice logo, but why is your site so bland? Welcome to