I have had a very hard time trying to get the gruff graphs gem working.
i have the rails recipes book and wasn’t intimidated when it said it
could get kinda hairy installing gruff and more specifically the evil
prerequisites ImageMagick and RMagick.
i read http://rmagick.rubyforge.org/install-faq.html and tried
installing from source code. i think that evil clown has cursed me.
was so annoyed by my experience trying to set this up that i looked at
some alternatives… all i found was scruffy and sparklines… scruffy
doesn’t do pie charts which is what i think would work the best for the
reports i specifically have in mind. sparklines does little itty bitty
icon graphs… not exactly what i’m looking for but the page shows
examples of the tiny graphs being scaled up. anyway, also tried getting
that working… no dice. maybe i’m just an idiot, but i didn’t have any
problem getting other gems and plugins working.
any help would greatly be appreciated.
stuart
Its true getting rmagick and image magick working can be a pain in the
ass.
Here is an install script I made for getting at least gruff working.
Its a modified version of Geoff Grosenbach’s install.
Im assuming you are using a mac.
mkdir src
cd src
#Libtools
echo downloading Libtools
curl -O ftp://ftp.gnu.org/gnu/libtool/libtool-1.5.22.tar.gz
tar -zxvf libtool-1.5.22.tar.gz
cd libtool-1.5.22
./configure
make
sudo make install
cd …
#JPEG Source
echo downloading JPEG plugin
curl -O ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar -zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
sudo make install
sudo make install-lib
sudo ranlib /usr/local/lib/libjpeg.a
cd …
#Libpng
echo downloading PNG plugin
curl -O
http://easynews.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8-config.tar.gz
tar -zxvf libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure --enable-shared --enable-static
make
sudo make install
cd …
#Ghostscript
echo downloading ghostscript
curl -O
ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs850/ghostscript-8.50-gpl.tar.gz
tar -zxvf ghostscript-8.50-gpl.tar.gz
cd ghostscript-8.50-gpl
./configure
make
sudo make install
cd …
#Freetype
echo downloading freetype
curl -O
http://download.savannah.gnu.org/releases/freetype/freetype-2.1.10.tar.gz
tar -zxvf freetype-2.1.10.tar.gz
cd freetype-2.1.10
./configure
make
sudo make install
cd …
#Imagemagick
echo downloading imagemagick
curl -O
ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.2.7-8.tar.gz
tar -zvxf ImageMagick-6.2.7-8.tar.gz
cd ImageMagick-6.2.7
./configure --with-modules --with-perl=/usr/bin/perl --with-jpeg
–with-jp2 --enable-shared --disable-static --without-magick-plus-plus
make
sudo make install
cd …
sudo gem install rmagick
sudo gem install gruff
Best of luck.
i appreciate the reply… unfortunately i am not on a mac… i’m on
fedora core 4. but thanks anyway, appreciate it
for the most part that script should work…just change curl -O to wget