Nginx, passenger, rails: no such file to download --bundler

I installed the OSX web server for the rails application running on nginx. When I manually start the server, the rails application works fine, but when I restart the server, I always get an error message for passengers

There is no such file to download --bundler

I assume that he should do something using Launch Daemon, which I installed manually:

# /Library/LaunchDaemons/org.nginx.ngnx.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>nginx</string>
    <key>UserName</key>
    <string>MyUser</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/Cellar/nginx/1.0.11/sbin/nginx</string>
        <string>-g</string>
        <string>daemon off;</string>
    </array>
    <key>KeepAlive</key>
    <true/>
    <key>NetworkState</key>
    <true/>
    <key>LaunchOnlyOnce</key>
    <true/>
</dict>
</plist>

As you can see, I use MyUseras UserName in plist. The nginx server starts after boot and starts as MyUser, but I get this error message.

When I restart it on the command line with sudo nginx -s stop && nginx, everything works fine.

Any ideas why?

change

my nginx.conf looks like this:

env GEM_HOME=/usr/local/rvm/gems/ruby-1.9.2-p290@rails311/gems;
worker_processes 1;

events {
  worker_connections 1024;
}

http {
  include mime.types;
  default_type application/octet-stream;
  sendfile on;
  keepalive_timeout     60 60;
  send_timeout          120;

  recursive_error_pages on;

  error_log  /var/log/nginx/error.log;
  access_log  /var/log/nginx/access.log;

  gzip on;
  gzip_http_version 1.1;
  gzip_comp_level 4;
  gzip_proxied any;
  gzip_vary on;
  gzip_min_length 1100;
  gzip_buffers 32 16k;

  #server_tokens off;
  tcp_nopush    on;
  tcp_nodelay   on;
  keepalive_requests 0;

  passenger_default_user eveadmin;
  passenger_default_group staff;
  passenger_root /usr/local/rvm/gems/ruby-1.9.2-p290@rails311/gems/passenger-3.0.12;
  passenger_ruby /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby;


  server {
     listen 8444;
     #server_name intranet.local;
     root /Users/eveadmin/rails/intranet/public;
     passenger_enabled on;
     rails_env development;
  }
}

error i get

+5
4

2 : GEM_HOME nginx.

0

nginx.conf user_default_user user_default_group.

- , .

. Phusion Passenger.

0

sudo, rubygems bundler? , .

0

. , w/sudo, , , sudo, .

, - , $PATH $GEM_HOME . b/c (, bash) . , - :

/bin/bash -l -c '/usr/local/Cellar/nginx/1.0.11/sbin/nginx'

If this does not work, do you try to take the UserName key from your launch and see what happens?

0
source

All Articles