# Attachment\_fu problems with image\_science

**URL:** <https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941>\
**Category:** Rails\
**Created:** [May 29, 2008, 6:53am UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941 "2008-05-29T06:53:23Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [May 29, 2008, 6:53am UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/1 "2008-05-29T06:53:23Z")

</div>

I’m following clark’s tutorial on attachment\_fu and the upload works  
great, but the code fails to generate thumbnails. I get this error

“Problems loading image\_scienceProcessor: no such file to load –  
image\_science”

though when i check $gem list i see image\_science is right where it  
should be

actionmailer (2.0.991, 2.0.2)  
actionpack (2.0.991, 2.0.2)  
activerecord (2.0.991, 2.0.2)  
activeresource (2.0.991, 2.0.2)  
activesupport (2.0.991, 2.0.2)  
acts\_as\_ferret (0.4.3)  
capistrano (2.3.0)  
cgi\_multipart\_eof\_fix (2.5.0)  
daemons (1.0.10)  
dnssd (0.6.0)  
fastercsv (1.2.3)  
fastthread (1.0.1)  
fcgi (0.8.7)  
ferret (0.11.6)  
gem\_plugin (0.2.3)  
highline (1.4.0)  
hoe (1.5.3)  
hpricot (0.6)  
image\_science (1.1.3)  
libxml-ruby (0.5.4)  
mini\_magick (1.2.3)  
mongrel (1.1.4)  
mongrel\_cluster (1.0.5)  
net-scp (1.0.0)  
net-sftp (2.0.0)  
net-ssh (2.0.1)  
net-ssh-gateway (1.0.0)  
rails (2.0.2)  
rake (0.8.1)  
RedCloth (3.0.4)  
ruby-openid (2.0.4)  
rubyforge (1.0.0)  
RubyInline (3.6.7)  
sqlite3-ruby (1.2.1)  
termios (0.9.4)

I modified the model in has\_attachment to include “:processor =\>  
:image\_science”. I’m having a separate problem installing image\_magick,  
so that isn’t a viable option.

I’ve searched up and down on the internet, and can’t seem to find anyone  
with the same problem. If you have any suggestions please let me know.

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [July 14, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/2 "2008-07-14T19:12:58Z")

</div>

Richard,

I am having exactly the same problem. Everything works on my macbook  
pro. But on my deployment server I get the same error.

I’m still looking. Hopefully I can find a solution. Like you, I’m  
having trouble with RMagick. Plus I like Image Magick because it’s so  
much slimmer (and I only need thumbnailing).

-Danimal

On May 28, 10:53 pm, Richard S. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [July 15, 2008, 12:01am UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/3 "2008-07-15T00:01:44Z")

</div>

Danimal wrote:

> Richard,
> 
> I am having exactly the same problem. Everything works on my macbook  
> pro. But on my deployment server I get the same error.
> 
> I’m still looking. Hopefully I can find a solution. Like you, I’m  
> having trouble with RMagick. Plus I like Image Magick because it’s so  
> much slimmer (and I only need thumbnailing).
> 
> -Danimal
> 
> On May 28, 10:53 pm, Richard S. \<rails-mailing-l…@andreas-

my problem ended up being with my ruby gems path on my server, which can  
have many many causes. remember whenever you “require RMagick” that you  
capitalize RM, because gems are case sensitive. If you go into your irb,  
and type “require rubygems” and then “require RMagick” what do you get??

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [February 14, 2009, 1:33pm UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/4 "2009-02-14T13:33:50Z")

</div>

Richard S. wrote:

> Danimal wrote:
> 
> > Richard,
> > 
> > I am having exactly the same problem. Everything works on my macbook  
> > pro. But on my deployment server I get the same error.
> > 
> > I’m still looking. Hopefully I can find a solution. Like you, I’m  
> > having trouble with RMagick. Plus I like Image Magick because it’s so  
> > much slimmer (and I only need thumbnailing).
> > 
> > -Danimal
> > 
> > On May 28, 10:53 pm, Richard S. \<rails-mailing-l…@andreas-
> 
> my problem ended up being with my ruby gems path on my server, which can  
> have many many causes. remember whenever you “require RMagick” that you  
> capitalize RM, because gems are case sensitive. If you go into your irb,  
> and type “require rubygems” and then “require RMagick” what do you get??

I’m having the EXACT same problem. Tried everything to get RMagick to  
work and I could never get require ‘RMagick’ to work. So, I uninstalled  
everything RMagick related and tried to switch to image\_science, since  
it seems to be more lightweight anyway. but require ‘image\_science’  
didn’t work

After reading your post I just tried require ‘rubygem’ THEN require  
‘image\_science’ and it worked! What does this mean though? How can I  
get the rubygems in the right path so that all my gems are accessible be  
default. Do I need to worry about this with rails? I would think rails  
would run similarly to irb and would thus need rubygems included  
somehow? I haven’t put my server in production yet (or even deployed my  
first rails app) so I haven’t tested anything.

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [February 27, 2009, 2:33am UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/5 "2009-02-27T02:33:33Z")

</div>

What does “which gem” return? What does “sudo gem list” show? Is REE  
in your path?  
Try to “su” as the owner of your app and make sure you can load the  
gem from there.

We had some issues with passenger, REE, and image\_science (gems in  
general, really) and it was due to gems existing in the wrong gem  
repository.

-Chris

On Feb 14, 4:33 am, Tod M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [July 15, 2008, 1:39am UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/6 "2008-07-15T01:39:38Z")

</div>

Hi Richard!

Actually, turns out the RMagick issue was a path deal. It was looking  
in /usr/local/lib instead of /usr/lib (or vice-versa… I can’t  
remember now). I ended up just copying the library since this isn’t  
even the full deploy server… just a staging server for now.

The real problem is that I can’t get ImageScience to load. AFter a TON  
of trial and error, I determined it’s an incompatibility with  
ImageScience and Passenger (mod\_rails). It worked fine with Mongrel  
and with FastCGI. Ahh well. I’ll just use RMagick for now.

-Danimal

On Jul 14, 4:01 pm, Richard S. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![indigoi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/b3f665/32.png) [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Post date:** [April 22, 2009, 11:22pm UTC](https://www.ruby-forum.com/t/attachment-fu-problems-with-image-science/138941/7 "2009-04-22T23:22:30Z")

</div>

ujohnc00 wrote:

> What does “which gem” return? What does “sudo gem list” show? Is REE  
> in your path?  
> Try to “su” as the owner of your app and make sure you can load the  
> gem from there.
> 
> We had some issues with passenger, REE, and image\_science (gems in  
> general, really) and it was due to gems existing in the wrong gem  
> repository.
> 
> -Chris
> 
> On Feb 14, 4:33ï¿½am, Tod M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

Also make sure you have freeimage installed properly. This recently  
sprouted up again and I had to install freeimage from source per these  
directions:

[http://www.urbanpuddle.com/articles/2008/01/22/install-freeimage-imagescience-on-ubuntu-gutsy](http://www.urbanpuddle.com/articles/2008/01/22/install-freeimage-imagescience-on-ubuntu-gutsy)

-Chris
