user1883793
user1883793

Reputation: 4189

Rails production log file empty? (Ngnix + Passenger + Centos)

My Rails app is running on a VPS using Ngnix and passenger, deployed using Capistrano, but the production.log in my log directory is empty.. Where are my Rails production logs??

Thanks

Upvotes: 2

Views: 1066

Answers (1)

A H K
A H K

Reputation: 1750

  1. Check if rails_env production; line added in your nginx config file:

    server { listen 80; server_name localhost;

        #charset koi8-r;
    
        #access_log  logs/host.access.log  main;
        root /home/ubuntu/app_name/public;
        passenger_enabled on;
        rails_env production;
    
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    
  2. Remove rails_12factor gem if added in your gem file

    # group :production do

    # gem 'rails_12factor'

    # end

Upvotes: 2

Related Questions