I read the 13th recipe in the book “Rails Recipes” from Chad F… I
install with gem the gruff-library (gem install gruff). After the
installation, I download the “rmagick-win32-1.13.0_IM-6.2.9-3.zip” file
and install it on my win32-machine. It was successfully!
So, I create a controller with script/generate. In a method, which I
wrote after the creation, I’ll make an instance of a “Gruff object”:
require ‘gruff’
def create_chart
g = Gruff::Line.new(200)
end
But it doesn’t work now! Error: MissingSourceFile - no such file to load
– RMagick
Can anyone help me? Thx
M. R. wrote:
I read the 13th recipe in the book “Rails Recipes” from Chad F… I
install with gem the gruff-library (gem install gruff). After the
installation, I download the “rmagick-win32-1.13.0_IM-6.2.9-3.zip” file
and install it on my win32-machine. It was successfully!
So, I create a controller with script/generate. In a method, which I
wrote after the creation, I’ll make an instance of a “Gruff object”:
require ‘gruff’
def create_chart
g = Gruff::Line.new(200)
end
But it doesn’t work now! Error: MissingSourceFile - no such file to load
– RMagick
Can anyone help me? Thx
Try this in irb:
irb(main):001:0> require ‘RMagick’
=> true
irb(main):002:0> Magick::Image
=> Magick::Image
If you get errors then your gem is not installed properly. Make sure
you have the latest version and reinstall it.
M. R. wrote:
But it doesn’t work now! Error: MissingSourceFile - no such file to load
– RMagick
RMagick is a nightmare. I’ve had all kinds of screwy behavior –
conflict between the gem and the library, case sensitivity issues in the
require method, on and on.
Try Alex’s irb thing above. If that doesn’t work, instead of
irb(main):001:0> require ‘RMagick’
try
irb(main):001:0> require ‘rmagick’ # <-- all lowercase
Then
irb (main):002:0> Magick
If that works then you’ll need to check and see how gruff is requiring
RMagick, and possibly change the gruff source (sucks, I know) to get the
require right. Or you can do the correct require yourself and see if you
can use error handling in some fancy fashion to avoid the error when
gruff tries to load the wrong RMagick – if that’s indeed the problem.
Good luck.
/afb
RMagick docs state that “you also need one or the other of ImageMagick
or GraphicsMagick. GraphicsMagick is a friendly fork of ImageMagick.
You only need one of these. Which one you
choose is up to you.”
Do you have either of the prerequisites up and running?
http://rmagick.rubyforge.org/install-faq.html
Hi !
2007/1/4, M. R. [email protected]:
But it doesn’t work now! Error: MissingSourceFile - no such file to load
– RMagick
Did you try to require RMagick from environment ?
Can you run “convert” from the command line ?
Bye !
François Beausoleil
http://blog.teksol.info/
http://piston.rubyforge.org/