Rails & Pow - how do I print something to stdout when my server script is being executed in dev?

496 Views Asked by At

So in python/django I can just put the line print 'something' in my code and something will get printed to the console. How do I do this in Rails? I'm on Mac using Pow as my development server.

1

There are 1 best solutions below

0
On BEST ANSWER

Pow stores log files for your apps in ~/Library/Logs/Pow/apps. You can cd to this directory in your terminal and then run tail -f my_app.log to view your log as it updates (-f is for 'follow'). You can then print from your ruby/rails scripts using the puts command and the output will appear in this log file.