Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

running rails app in production mode is not displaying the production server logs in terminal. and showing the error something went wrong in browser

When i run the rails app in development mode,server logs are displaying in terminal properly. But when i run the app in production mode server is not displaying any server logs in terminal. and an error is displaying in the browser like "We're sorry, but something went wrong.".i am running the server with the following command.and i am using the thin server.

rails s -e production

this is the output i am getting in server mode when i start the server.and after this when i made any request no output is displaying.

prashant@prashant-pc:~/client_proj/template$ rails s -e production
=> Booting Thin
=> Rails 4.1.5 application starting in production on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
[DEPRECATION] requiring "RMagick" is deprecated. Use "rmagick" instead
Thin web server (v1.6.3 codename Protein Powder)
Maximum connections set to 1024
Listening on 0.0.0.0:3000, CTRL+C to stop

what might be issue i am not getting.

like image 917
John Avatar asked Nov 01 '25 15:11

John


1 Answers

In production.rb you can add this option: config.logger = Logger.new(STDOUT)

like image 181
Igor Biryukov Avatar answered Nov 04 '25 04:11

Igor Biryukov