Question
Sites-Enabled for Unicorn+Nginx with Rails
Hi,
I have a problem with Rails configuration and setup on server.
I have Rails application, and I hosted it using Unicorn and Nginx, but now I can’t access to application. I did pull origin master and I pulled the latest changes but I also did
sudo service nginx stop.
Now when I did ngnix start I am getting an error:
nginx: [emerg] unknown directive “rails_env” in /etc/nginx/sites-enabled/default:10
My default file is:
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name example.com;
rails_env production;
root /home/rails/public;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
Unicorn is running.
Any help please,
Bojan
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×