nginx - Shell commands fail in Rails in production mode -


I have deployed on the VPS of a Railway 4 application which executes the shell command based on the function. APC runs on NGX with passenger.

My position is that none of the shell commands work. After some debugging, I've found that every command returns a "Not Found" error message.

For example:

  outside =% x [date2> & Amp; 1] # output 'sh: 1: date: not found \ n'  

Why is this happening? Should some configuration settings be set to allow shell commands in output mode? I am quite new to the railways, so I am not sure why this may be the reason.

Update:

This is a bit more information, when the train asks whoami , give me www-data If I print $ path, I get /usr/local/lib/ruby/gems/2.1.0/bin but then if the command line is in the sudo -u If the www-data printenv PATH is executed then / usr / local / sbin: / usr / local / bin: / usr / sbin: / usr / bin: / Sbin: / bin . .. Does this have any meaning?


Comments