Paperclip Problems

October 17th, 2008 § 0

I’ve started to use Paperclip on a pet project I’m working on (a recommendation from Josh Owens), and the API is great, except for the fact that I couldn’t get it to work.

Files were being uploaded fine, but my thumbnail and other variations were not generating. The documentation says that the whiny_thumbnails option defaults to true, but my reality seems to dictate otherwise.

After I added that…

has_attached_file :receipt, 
:styles => { :medium => "600x600>", :thumb => "100x100>" },
:whiny_thumbnails => true

…I was at least getting an error:

/tmp/stream.13496.0 is not recognized by the 'identify' command.

At long last, I figured that the error message is totally inaccurate. What it really meant is “I’m looking for ‘identify’ in /usr/bin instead of /opt/local/bin even though /opt/local/bin is in your user path”.

For fixing:

cd /usr/bin
sudo ln -s /opt/local/bin/convert convert
sudo ln -s /opt/local/bin/identify identify

You’ll probably only have this problem if you installed ImageMagick via MacPorts (as I did). I probably could have fixed it by adding /opt/local/bin to the $PATH used by the web server user, but whatever. This worked.

Like it? Share it:
  • Print
  • Facebook
  • Twitter
  • Digg
  • LinkedIn
  • StumbleUpon
  • Reddit
  • Technorati
  • del.icio.us
  • Google Bookmarks

Tagged: , , , ,

§ Leave a Reply

What's this?

You are currently reading Paperclip Problems at humandoing software.

meta