乘客错误:无法为application / home / user / app / current生成进程

时间:2017-01-21 06:48:12

标签: ubuntu nginx passenger

我正在使用数字海洋上的Nginx和Passenger设置Rails应用程序,但访问IP地址时出错。

  

我们很抱歉,但出了点问题。

错误日志: /var/log/nginx/error.log

  Could not spawn process for application 
    /home/<user>/<app>/current: An error occurred while starting up the preloader.
  Error ID: 1bb1fce1
  Error details saved to: /tmp/passenger-error-vZPTxi.html
  Message from application: Unable to autoload constant
    API::Mobile::V1::BaseApiController, expected
     /home/<user>/<app>/releases/20170121053748/app/controllers/api/mobile/v1/base_api_controller.rb 
    to define it (LoadError)

如果我导航到错误~/<app>/releases/20170121172857/app/controllers/api/mobile/v1中引用的目录,则该错误与该行有关,

class Api::Mobile::V1::BaseApiController < ApplicationController

所以我想知道ApplicationController是否有问题? (虽然它在本地工作)

* /tmp/passenger-error...html文件中有更多信息,但它非常详细,所以我不知道要包含哪些内容。

/位点可用/默认值:

server {
        listen 80;
        listen [::]:80 ipv6only=on;

        server_name 127.0.0.1;
        passenger_enabled on;
        rails_env production;

        root /home/<user>/<app>/current/public;

        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root html;
        }
        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                try_files $uri $uri/ =404;
        }
}

nginx.conf

user www-data;
worker_processes auto;
pid /run/nginx.pid;

events {
        worker_connections 768;
}
http {
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 
        ssl_prefer_server_ciphers on;

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

        gzip on;
        gzip_disable "msie6";

        include /etc/nginx/passenger.conf;

        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

我在SO上看过类似的问题,但答案到目前为止无法提供帮助。

这是否有共同的解决方案?

0 个答案:

没有答案