Carrierwave unable to process uploaded images when Rails app is running with Passenger for Nginx, but works with Apache
18:33 15 Jun 2026

Apologies for the complex title. I have a Rails 7.0 application running on Ubuntu 24.04 that uses Carrierwave to handle image uploads.

Until today I was running the application using Passenger as an Apache module, with a Nginx front-end. Today I began phasing out the Apache backend by installing libnginx-mod-http-passenger and porting my Passenger configuration from Apache to Nginx.

The application runs perfectly with the new Nginx config except that file uploads are failing with a MiniMagick::Error exception:

`convert /home/[web server user]/web/example.com/releases/20260612162919/tmp/1781558339-825732679222976-0004-9251/IMG_4425.jpeg -auto-orient -resize 700x700> /tmp/image_processing20260615-1586746-byraz9.jpeg` failed with status: 127 and error: (MiniMagick::Error)
executable not found: "convert"

The convert executable is installed where it always has been:

$ which convert
/usr/bin/convert

Nothing else on the server has changed, and the application has been running without issue for years. Nginx is running as the "www-data" user, same as Apache, so there should be a $PATH issue, but it appears there may be. I can't find if Nginx has its own $PATH that it uses, nor does my Apache config have a $PATH set anywhere. I assume they both rely on the user they run as.

What could cause this issue when changing to the Nginx Passenger module?

nginx passenger carrierwave