Google

Thursday, November 01, 2007

chasing leopard, ..., caught up on rmagick at least.

when i first got into ror(ruby on rails) earlier this year getting the system configured w/ ruby, rails, gem, and rmagick in particular was a pain, on my fedora core desktop.
then came along ubuntu's easy install guide followed by fedora core(5, 6 and onward)'s easy to install, with all those '*-dev' packages that contain all the libraries.

rmagick, in short, is imagemagick/graphicsmagick package for ruby-on-rail that ror developers use a lot.

well, with my environment setup nicely, and not being a heavy mac user i only enjoyed stuffed animal leopard at local mac sotres and didn't bother with mac os update. getting a bit too old to be caught up in flurry of hypes.

well, derek is a cool guy and he waited on the line on last friday to get leopard copy, along with free t-shirt, and installed it. now it comes with ruby, rubygem and rails, but not with rmagick or mysql. when he had no success and couldn't get his work done (for having clean installed the whole system on his mac book), i got volunteered in this morning. i mean yesterday morning. i spent good 5hours solid chasing gtk, librsvg and imagemagick-devel that may or may not exist. with gtk, the dependencies were about as greek to me as the gtk package itself. requires pango then requires cairo, but it reality gtk requires pango with cairo support. and then there is question of incompatible pkgconfig. what do you mean pkgconfig is too old? leopard is been out less than a week....

anyhow, i can't let rmagick defeat me, so i picked up a leopard copy and spent good 2+ hrs getting it on my precious mac mini, the one with dual boot partition of fedora core 6. why 2+ hours? takes about 45minutes, and i did it twice, because i messed up playing with boot camp and few other configs. with the install my rEFI bootloader is blown away. my linux partition is still there, but no bootloader to let me start with linux partition. sob, sob, sob... since boot camp is only compatible with windows os, and i have no room nor wish to delete current linux partition and reinstall(i actually was using my inux partition right up to the point i started inserting leopard dvd in, for installation).

unlike earlier the day i actually searched for rmagick installation how to, and got lucky.

http://pastie.caboo.se/72596 actually works.

some of urls didn't work so i had to manually download it. but steps are golden. i skipped ruby, rubygem and rails. i also used 'sudo gem install rmagick' instead of doing tar source install.

but it works.

i did 'cd rails/test/; script/console; require 'RMagick' ' and it worked. only took me what about 2+ hours, and another hour to copy over the list of tar files and instruction for derek?

yay...

thanks Josh Goebel. you saved me my sanity.

now i still gotta figure out why readline doesn't compile and why mysql server doesn't start from boot.

worst of all, i gotta figure out my dual boot.

but now i can sleep, finally, at 4am, for having rmagick working on my new shiney leopard os.

and, i can see some cool desktop features on leopard. through my sleepy slanted eyes.

pkgs i needed:
* pcre-7.4
* lighttpd-1.4.18
* freetype-2.3.4
* libpng-1.2.22
* jpegsrc.v6b
* tiff-3.8.2
* libwmf-0.2.8.4
* lcms-1.17
* ImageMagick-6.3.6-4
* ghostscript-fonts-std-8.11 (when untar, goes to fonts dir instead of ghostscript-fonts dir)

steps from my home>Downloads folder terminal shell:
tar xvf pcre-7.4.tar
cd pcre-7.4
./configure --prefix=/usr/local CFLAGS=-01
make
make install
cd ..
tar xvf lighttpd-1.4.18.tar
cd lighttpd-1.4.18
./configure --prefix=/usr/local --with-pcre=/usr/local
make
make install
cd ..
tar zxvf freetype-2.3.4.tar.gz
cd freetype-2.3.4
./configure --prefix=/usr/local
make
make install
cd ..
tar xvf libpng-1.2.22.tar
cd libpng-1.2.22
./configure --prefix=/usr/local
make
make install
cd ..
tar xvf jpegsrc.v6b.tar
cd jpeg-6b/
ln -s `which glibtool` ./libtool
echo $MACOSX_DEPLOYMENT_TARGET
export MACOSX_DEPLOYMENT_TARGET=10.5
./configure --enable-shared --prefix=/usr/local
make
make install
cd ..
tar xvf tiff-3.8.2.tar
cd tiff-3.8.2
./configure --prefix=/usr/local
make
make install
cd ..
tar zxvf libwmf-0.2.8.4.tar.gz
cd libwmf-0.2.8.4
make clean
./configure
make
make install
cd ..
tar xvf lcms-1.17.tar
cd lcms-1.17
make clean
./configure
make
make install
cd ..
tar xvf ghostscript-fonts-std-8.11.tar
mkdir /usr/local/share/ghostscript
mkdir /usr/local/share/ghostscript/fonts
cp fonts/* /usr/local/share/ghostscript/fonts/.
tar xvf ImageMagick-6.3.6-4.tar
cd ImageMagick-6.3.6
export CPPFLAGS=/-I/usr/local/include
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --with-quantum-depth=8 --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
make install
gem install RMagick

does it work? yes:
so far it looks okay on irb:
mac-mini:~ user$ cd rails/test/
mac-mini:test user$ script/console
Loading development environment.
>> require 'RMagick'
=> []
>>

1 Comments:

At 4:13 PM, Anonymous Anonymous said...

You could have simply run the following commands:

sudo port install ImageMagick ImageMagick-devel

sudo gem install rmagick

- Lex

 

Post a Comment

<< Home