Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hopefully this is the correct site to ask this question.

I've got a webservice I'm attempting to set up using NginX with Phusion Passenger riding a Ruby Sinatra application. The problem is that when I try to start the server and test the site, I get the following error:

zsh:1: no such file or directory: passenger/buildout/agents/SpawnPreparer

Now, I've been able to determine that SpawnPreparer is calling zsh, although, I'm not sure why. I don't even use zsh and I wasn't using it when I built the server. Nevertheless, what I'd like to know is if it's possible to configure passenger in the nginx.conf to use a different shell with which to spawn its processes? If so, how?

This is Phusion 4.0.14


share|improve this question

migrated from Jan 1 '14 at 1:42

This question came from our site for pro webmasters.

up vote 2 down vote accepted

When Phusion Passenger spawns an application, it does so by invoking the command $SHELL -lc '/path-to-passenger-root/buildout/agents/SpawnPreparer /path-to-passenger-root/helper-scripts/rack-loader.rb <SOME ARGUMENTS>'. It's described here: Here, $SHELL is the user's shell, as configured in the OS's user database (/etc/passwd). In your case, your user is setup with zsh as its shell. This is probably your OS's default setting.

Your error message indicates that it cannot execute the file passenger/buildout/agents/SpawnPreparer. In other words, Phusion Passenger thinks that /path-to-passenger equals passenger. This probably means that you set the incorrect value for the passenger_root directive, which dictates the proper value of /path-to-passenger.

share|improve this answer
Turns out the way to fix the problem was to use absolute paths in the passenger directives (root, ruby). Unfortunately, I have no control over the shell that the user is configured to use, in this case. I surmised that Passenger was attempting to run zsh on something but it was thinking that "something" was "1", which didn't make much sense. So, yes. As you mentioned, the path was relative (in a sandboxed environment I might add, which just made things more complex). Thank you for your help, again, Hongli! :) – Jim Jan 2 '14 at 15:08
You can disable the loading-through-the-shell thing with this option:… – Hongli Lai Jan 2 '14 at 15:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.