ruby - Passenger and Nginx unable to run rails application in production mode -


i have ubuntu ec2 instance configured rvm , psql after cloned rails application on ec2 instance via bitbucket. following digital ocean's link installed passenger , nginx on instance , set passenger_app_env development; inside server configurations. use application in production mode, removed line config , server configs follows:

    server {        #listen 80 default_server;         listen   443 ssl;         ssl         on;         server_name **.**.**.**;         passenger_enabled on;         rails_env production;         root /home/ubuntu/my_app/public;         ssl_certificate /home/ubuntu/my_app/my_app.pem;         ssl_certificate_key /home/ubuntu/my_app/my_app.key; }  server {        listen         80;        server_name    **.***.**.**;        return         301 https://$server_name$request_uri; } 

the app still running in development environment when execute rails.env.production? in console false result, shouldn't passenger implicitly assume application in production mode have removed setting mentioning development environment? sort of appreciated. lot. after every change make in config file run sudo nginx -s reload , sudo service nginx restart.

i think should add server block of configuration after passenger_enabled on:

passenger_app_env production; 

Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -