views:

462

answers:

1

I am trying to use image_magick gem to process image uploads, but rails can't locate it.

I have installed the gem successfully using:

gem install mini_magick-1.2.3.gem --local
gem update system
gem cleanup

and my model has

require 'rubygems'
require 'mini_magick'

However, I still get the error:

no such file to load -- mini_magick

Can I add something to the environment.rb to point rails to the correct location?

Environment information:

Windows XP/InstantRails 2.0 
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Rails 2.3.2

Thanks for the help,

+2  A: 

Sanity check: does gem list mini_magick show the gem as installed?

Edit:

Just noticed that you have 'my model has...'; pull them out of the Model, and put the require lines into environment.rb. You don't need require 'rubygems' if you're using Ruby 1.9.

Don Werve
Yes, it does: gem list mini_magick *** LOCAL GEMS *** mini_magick (1.2.3)
Goro