# RMagick problems

**URL:** <https://www.ruby-forum.com/t/rmagick-problems/81141>\
**Category:** Rails\
**Created:** [January 4, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/rmagick-problems/81141 "2007-01-04T15:40:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 4, 2007, 3:40pm UTC](https://www.ruby-forum.com/t/rmagick-problems/81141/1 "2007-01-04T15:40:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 5, 2007, 7:22am UTC](https://www.ruby-forum.com/t/rmagick-problems/81141/2 "2007-01-05T07:22:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 6, 2007, 4:17am UTC](https://www.ruby-forum.com/t/rmagick-problems/81141/3 "2007-01-06T04:17:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 7, 2007, 9:09am UTC](https://www.ruby-forum.com/t/rmagick-problems/81141/4 "2007-01-07T09:09:05Z")

</div>

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](http://rmagick.rubyforge.org/install-faq.html)

---

<div class="post-metadata">

**Author:** ![flnative](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@flnative](https://www.ruby-forum.com/u/flnative)\
**Post date:** [January 6, 2007, 7:30pm UTC](https://www.ruby-forum.com/t/rmagick-problems/81141/5 "2007-01-06T19:30:13Z")

</div>

Hi !

2007/1/4, M. R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 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://blog.teksol.info/)  
[http://piston.rubyforge.org/](http://piston.rubyforge.org/)
