Paperclip + Passenger = :(

93 views
Skip to first unread message

pimpmaster

unread,
Jul 5, 2008, 3:19:09 PM7/5/08
to Paperclip Plugin
Running my app in dev mode and Paperclip performs splendidly.

I just deployed to my server (which also has ImageMagick 6.3.8) and my
models get saved, but the attachments are essentially ignored.. no
errors in the logs, nothing.. mod_rails just pretends I didnt just ask
it to upload a file

Anyone else deal with this issue?

Jonathan Yurek

unread,
Jul 8, 2008, 4:05:06 PM7/8/08
to papercli...@googlegroups.com
Are you sure that imagemagick is in the $PATH available to Apache/
Passenger?

--
Jonathan Yurek
thoughtbot, inc.
jyu...@thoughtbot.com
617.482.1300 x114


kbingman

unread,
Jul 10, 2008, 10:26:48 AM7/10/08
to Paperclip Plugin
I have a similar problem, but in reverse. I have a few production
sites on slicehost using mod_rails; they use paperclip and work
perfectly. Locally, I just set up mod_rails for testing purposes on
two machines. The resizing doesn't work on either of them... The image
is uploaded, but no thumbnails are generated. Switch the same app over
to mongrel and it works.

convert is in /usr/local/bin/convert, which is also in my path. My VPS
has it is /usr/bin/convert, but that is the only difference I can come
up with so far. Oh... the server is Ubuntu(hardy) and works fine,
locally I am on 10.5.4...

Keith Bingman
ke...@keithbingman.com

Jonathan Yurek

unread,
Jul 10, 2008, 10:30:40 AM7/10/08
to papercli...@googlegroups.com
I'm not sure about this, but don't mod_rails apps run as the same user
as Apache? That would mean that what's in your personal $PATH doesn't
carry over. You should try specifying the path
("Paperclip.options[:image_magick_path] = '...'" in config/
initializers/paperclip.rb) and see if that works.

kbingman

unread,
Jul 10, 2008, 1:23:59 PM7/10/08
to Paperclip Plugin
Awesome. You made my day. That worked nicely.

Keith

Andrew Vit

unread,
Aug 23, 2008, 4:49:30 PM8/23/08
to Paperclip Plugin
Man, I wish that was documented somewhere... Would have saved me a ton
of time.

--Andrew

Marcus

unread,
Aug 29, 2008, 11:59:34 PM8/29/08
to Paperclip Plugin
Ahhh I'm just glad to have finally found it. Thanks for the tip
Jonathan. My initializers/paperclip.rb ended up looking like this (OS
X locally, Ubuntu on the server):

if RAILS_ENV == "development"
Paperclip.options[:image_magick_path] = '/opt/local/bin/'
else
Paperclip.options[:image_magick_path] = '/usr/bin/'
end

Tim Haines

unread,
Aug 30, 2008, 4:26:04 AM8/30/08
to papercli...@googlegroups.com
Hey Marcus,

I did almost exactly the same, except my test environment is the same as development..

Tim.

craig t mackenzie

unread,
Oct 17, 2008, 7:27:07 AM10/17/08
to Paperclip Plugin
You can actually just store the path in your enviroments files, like
so:

IMAGE_MAGICK_PATH = "/opt/local/bin"

then your initializer looks like this:

Paperclip.options[:image_magick_path] = IMAGE_MAGICK_PATH

Bit DRYer.

-craig

Chris Simmons

unread,
Dec 15, 2008, 11:24:17 AM12/15/08
to Paperclip Plugin
I'm having this problem on Mediatemple's DVs... I tried setting the
option in my initializer, but still no luck.

My head hurts from banging it against my desk. Any thoughts?

Thanks!
Chris


On Oct 17, 6:27 am, craig t mackenzie <craigtmacken...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages