Pull up IRB and try your require ''RMagick'' there, see if it is
installed
correctly and if ruby knows where to find it. Don''t worry if you get
"false" returned, as long as it doesn''t spit up a bunch of
errors.
C:\Code\Work\db\migrate|? irb
irb(main):001:0> require ''RMagick''
=> false
irb(main):002:0> require ''rgick''
LoadError: No such file to load -- rgick
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__''
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require''
from (irb):2
irb(main):003:0>
As for where to call it, so that it is included in your app I''m not
sure. I
do believe >= 1.0 you want to use config/boot.rb. Before 1.0 I used
config/environment. However I''m not sure if that is the way to go.
-B
On 1/23/06, Dorian Mcfarland <loaf@isness.org>
wrote:>
> Hello,
> I''m trying to use rmagick in a helper script (for auto-generating
image
> sizes) and I''m not sure where I should be calling
''require''.
>
> currently I have:
> require ''RMagick'' at the top of my controller:
>
> class FilmsController < ApplicationController
> require ''RMagick''
>
> but that''s giving me an error:
>
> uninitialized constant ImageList
>
> ...whenever I try and do anything. From what I''ve read it seems
that this
> probably a failure to require.
>
> Looking for RMagick in my system I find:
>
> /usr/lib/ruby/gems/1.8/gems/rmagick-1.9.3/lib/RMagick.rb
> /usr/local/lib/site_ruby/1.8/RMagick.rb
>
> but do I need to specify where rails should be looking for these files?
>
> dorian
>
> --
> I do things for love or money
> --
> +44 (0)7941 219 501
> --
> aim:oulalipo | yahoo:tachekent
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060123/c771f784/attachment-0001.html