Nginx 旅客レール

Nginx 旅客レール

Ubuntu 14.04 と nginx/passenger/rails を搭載した EC2 では、nginx に次のログが表示されました。

アプリ 31063 標準エラー出力:* エラー *: /usr/local/lib/ruby を実行できません: 権限が拒否されました (13)

アプリ 31065 stderr: /etc/profile.d/rbenv.sh: 行 3: rbenv: コマンドが見つかりません

nginx conf は次のとおりです:

worker_processes  1;
error_log  logs/error.log;
events {
    worker_connections  1024;
}

http {
    passenger_root /usr/local/lib/ruby/gems/2.2.0/gems/passenger-5.0.18;
    passenger_ruby /usr/local/lib/ruby;

    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;

    server {
       listen 80;
        server_name teste.com;
        root /home/ubuntu/teste/current/public;
        passenger_enabled on;
        rails_env production;
        access_log  logs/access.log;


        location ~ ^/(assets)/  {
          gzip_static on;
          expires max;
          add_header Cache-Control public;
        }


       error_page 500 502 503 504 /500.html;
       client_max_body_size 4G;
       keepalive_timeout 10;

            }


}

誰か雲に光を当ててくれませんか?ありがとう

答え1

正しく設定されていませんpassenger_ruby

    passenger_ruby /usr/local/lib/ruby;

これは Ruby バイナリ自体に設定することを意図しています。しかし、ディレクトリに設定されています。

通訳者の場所に変更しますruby

関連情報