I installed puma
gem and when I start rails server by rails s
I can see full output:
$ rails s
/Users/serj/.rvm/gems/ruby-2.2.1@email_
If you use foreman or a Procfile
, you can add the tail -f log
to your Procfile
. This is what I use:
# Procfile.dev
web: bundle exec puma -p $PORT
webpack: bin/webpack-dev-server
log: tail -f log/development.log
I then start rails like this:
$> PORT=3000 foreman start -f Procfile.dev
I actually have an alias for this in my .zshrc
:
alias railss='PORT=3000 foreman start -f Procfile.dev'
So I can simply start Rails with:
$> railss
The logs are in log/<rails env>.log
. So you could (in a separate tab / window) run:
tail -f log/development.log
And you'll see all your output. If you want the output from rails merged into the puma logs, you could always have rails log to STDOUT
:
config.logger = Logger.new(STDOUT)
If it's the logs you're interested in, then you can tail the actual log file. It'd go something like this tail -f log/development.log
.
I've found this command in the Puma github readme:
$rails s Puma
Which also results in the desired behavior.
Edit: In fact, as described here after installing Puma, it should automatically be picked up by rails s command without the Puma argument.