From: Raj Date: 2006-02-02T07:39:38+09:00 Subject: Re: Testing Rails: problem running a Gruff sample Richard Lionheart wrote: > Hi All, > > I get errors when I try to run a Gruff sample for my WinXP/SP2 system > and > get an error which I can't fathom. > The sample is "Code Sample" from > http://nubyonrails.topfunky.com/pages/gruff > (scroll down to find it). I call it GraphicsTest.rb and display it > below. > > When I test it from within SciTE, I get: >>ruby GraphicsTest.rb > GraphicsTest.rb:6: uninitialized constant Gruff (NameError) >>Exit code: 1 > I ran into the same issue and resolved it as follows: You need to have RMagick installed and configured. Instructions to install Rmagick on windows are here: http://rmagick.rubyforge.org/install-faq.html#win However for the Rmagick install to work gem must be at 0.8.11 level. In my case gem --version reported 0.8.10 So, I did the following to get gem updated: gem install rubygems-update update_rubygems That took care of gem --version (reports 0.8.11) Then I did the following: downloaded RMagick-1.9.2-IM-6.2.4-6-win32.zip from the rubyforge site unzipped it, then ran the following commands from the directory where the files where unzipped to gem -install RMagick-win32-1.9.2-mswin32.gem postinstall.rb Then ran a simple standalone program (same as the one you tried) that used gruff and voila! everything worked. Adding it to my test Rails application was a breeze after that. Hope that helps. Raj -- Posted via http://www.ruby-forum.com/.