I have found a new way of doing this that is so good I can’t believe I haven’t heard about this before. It turns out, there is a one click (command) installer for ImageMagick and RMagick and nobody is talking about it. If you go to the RMagick home page and look though the FAQ you will see the first choice is to use the installer script. Choices two and three both revolve around Ports, so we can all ignore those from now on.
Here is how to do it:
You probably already have XCode installed, but do you have the X11 SDK installed? Probably not, because it is not installed by default.
UPDATE: Ignore this step if you are on Leopard. Make sure you have X11 also installed. Yes, this is different from the SDK. This page will tell you how easy it is to do that.
Did the “rmagick-osx-installer” finish downloading and automatically unzip to a folder on your desktop called “rm_install-1.0.2 Folder?”
Using (i)Term navigate to that folder and run: “ruby rm_install.rb”
Did you get an error that says something like “The installation directory ‘xxx’ contains blanks. Some of the install scripts for the dependent libraries can’t handle directory names with embedded blanks. Please choose another directory.”
I think this is probably the biggest reason why this installer is not more popular, I had no idea what this error meant. I had to look in the source code to figure out that the path to the rm_install.rb is not allowed to contain spaces (blanks). Then why did it unzip to a folder whose name has a space in it?
OK, cd ../ && mv rm_install-1.0.2\ Folder rm_install-1.0.2 && cd – (Or: rename the directory so it has no spaces.)
Run the installer again and it should automagickally install RMagick, ImageMagick, and all dependencies.
Now I know what you are thinking, “Steve, if you’re installing RMagick did you get a brand new computer?!” And the answer is sorrowfully no. But what I did have is my SECOND hard drive failure in six weeks. That means that this is my third hard drive on a computer that is less than one year old. And I am excited because I am sure I will have to reinstall all of my gems (including RMagick) and ImageMagick next month when Leopard comes out. Happy, happy, joy, joy. But at least I finally found the right way to do it!
If you wanted it to build a product you’d find a way to get time to work on it. If you really wanted to start that new hobby you’d sacrifice something to find the time and money to do it.
I'll define a "Wannabe Entrepreneur" as someone who has never made money from their businesses. Here are the different types of wannabes.
In the past few years I've built go-carts, built a 200+ sq ft workshop, written several eBooks. How do I create a life where I have time to work on side projects?
Receive 5 Software projects mistakes we have made over the years and how to avoid them.
3 Comments
That is awesome. I got a new MacBook Pro last week and I remember what a pain IM was to install on the last one. Good to know it will be less painful this time.
This is awesome, I had so much trouble with ports trying to install ruby for me that I just 86ed it and installed IM by hand. What a nightmare. Thanks again.
One note. After running the script and opening up irb, a require ‘rubygems’;require ‘rmagick’; was failing on the rmagick bit. I’m not sure why, but I did a sudo gem install rmagick which seemd to finish off the install. Works now. Thanks for the post Steve.