tzhtzq
Last Updated: February 25, 2016
·
2.805K
· rossnelson

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']}"

3 Responses
Add your response

11900

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 ?

over 1 year ago ·
11901

I ask, because I did do so, solved the issue at hand. But wonder whether if it's not best in environment.rb ?

over 1 year ago ·
11902

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.

over 1 year ago ·