Passenger + Carrierwave + Rails
I received this error in Production with Passenger.
No such file or directory - identify -ping /tmp/mini_magick20120225-3898-acxvro.jpg
Imagemagick was installed with homebrew.
The $PATH
environment variable did not include /usr/local/bin
. So, it couldn't find the imagemagick commands.
After adding the following line to the bottom of my production environment file everything worked properly.
ENV['PATH'] = "/usr/local/bin:#{ENV['PATH']}"
Written by Ross Nelson
Related protips
3 Responses
This seems to be a nasty critter popping up in different places with different solutions. Example: http://stackoverflow.com/questions/17357014/imagemagick-mini-magick-tmp-files-error-ruby-on-rails/20933010#20933010
To further your suggestion, assuming one runs a localhost, then develops in development, runs development in production server because of acute development paranoia 8=\, would you suggest the same be added to development.rb ?
I ask, because I did do so, solved the issue at hand. But wonder whether if it's not best in environment.rb ?
If you need this in production and development, I would recommend putting it in config/application.rb. I'm not sure what best practice is, but I tend to leave the config/environment.rb alone. I run most of my local development with rails server. So, I've never needed it in development.
To state the obvious, It seems some individuals have deeper problems with their system configuration and this solution may not work for them.