nginx - Shell commands fail in Rails in production mode -



nginx - Shell commands fail in Rails in production mode -

i have deployed on vps rails 4 application executes shell command depending on tasks. app runs on nginx passenger.

the situation having none of shell commands work. after bit of debugging, i've noticed every command returns "not found" error message.

for example:

out = %x[date 2>&1] # outputs 'sh: 1: date: not found\n'

why happening? there configuration setting should set allow shell commands in production mode? quite new rails i'm not sure causing this.

update:

here's bit more information, when querying rails whoami, www-data, if print $path /usr/local/lib/ruby/gems/2.1.0/bin if in command line execute sudo -u www-data printenv path result /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin... makes sense?

ruby-on-rails nginx passenger

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -