The ELC Community Blog
A knowledge exchange on Ruby on Rails and Agile Development
Installing Freeimage + image_science on Leopard
by Jeff Emminger on November 07, 2007
So I upgraded to Leopard the other day (actually I did a clean install), and all is well until I attempted to start a rails project that uses image_science. image_science depends on Freeimage as I'm sure you're aware, and the Freeimage install was failing spectacularly. Google to the rescue! Here's how I got it to install:
From http://www.ruby-forum.com/topic/129554#578387
1. I started with a clean install of Leopard.2. Install macports for 10.43. Install the xcode dev tools from the Leopard disk - *be sure to also install the 10.3 sdk from the xcode dev tools install*4. sudo port install freeimage5. cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_freeimage/work/FreeImageand change this:LIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdkto thisLIBRARIES_PPC = -Wl,-syslibroot /Developer/SDKs/MacOSX10.3.9.sdk/usr/lib LIBRARIES_I386 = -Wl,-syslibroot /Developer/SDKs/MacOSX10.4u.sdk/usr/lib6. sudo port install freeimage7. sudo gem install -y imagescience8. cd /Library/Ruby/Gems/1.8/gems/RubyInline-3.6.4/lib9. edit inline.rblook for the lineflags = @flags.join(' ')and change it toflags = @flags.join(' ') + ' -lruby'10. remove ~/.ruby_inline
Some notes:
Step #5 pertains to the file Makefile.osx
Before attempting to install freeimage again in step #6, be sure to cd out of /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_graphics_freeimage/work/FreeImage I just did a "cd ~" before "sudo port install freeimage"
Big thanks and all credit to original posters Thomas Mango and Michael Steinfeld for this information.
Timeline
- Creating new generator commands
- Testing Libraries
- Rendering views without a web request in rails
- Can I Take a Test Drive?
- Points and Velocity in Trac Reports
- Installing Freeimage + image_science on Leopard
- Writing view helpers with 'yield'
- Duplicate Migrations in Rails Plugin
- Europe, meet Amazon S3
- Leopard Rcov
- OpenSocial and Ruby
Comments
Thanks for the help. I also had to change MacOSX10.3.9 to MacOSX10.5 everywhere in the Makefile.osx to make it work.
The Image Science gem has an underscore in it.
sudo gem install -y image_science