4

In Mongrel, we are able to see any ruby debug code. After installing thin and doing thin start. I don't see any debug code on the console window.

Is this nromal?

Are we supposed to use tail -f log/development.log in a new console window to view the debug code?

Christian Fazzini
  • 19,613
  • 21
  • 110
  • 215

4 Answers4

6

You could also try to start your server this way :

rails server thin

It shows your log, in Rails 3 at least.

Pierre Olivier Martel
  • 3,144
  • 4
  • 26
  • 30
  • 1
    Thx but how can i start thin in this way with ssl options ? this is my cmd: thin start -p 3000 --ssl --ssl-key-file .ssl/localhost.key --ssl-cert-file .ssl/localhost.crt – Alexander Sidikov Pfeif Oct 26 '14 at 18:09
3

Yes. The solution with tail is normal, and you should use it.

tjeden
  • 2,019
  • 1
  • 13
  • 19
2

You can use a Procfile with foreman:

Procfile

web: thin start -p $PORT
logger: tail -f log/development.log

Example

$ foreman start -p 3000
Adit Saxena
  • 1,617
  • 15
  • 25
0

The solution is to add a small code snippet in your config.ru file, and thin output all app logs to the console. You do not need to tail the log file, and it keeps log coloring intact

Details here: Thin server: ouput rails application logs to console, as 'rails s' does

Community
  • 1
  • 1
Benjamin Bouchet
  • 12,971
  • 2
  • 41
  • 73