Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get Rails debugging output in Pow similar to WEBrick?

When I use rails/server (WEBrick) I get constant debug info (queries, etc) from my rails app as console output. Is there a way to get this debug output with Pow?

Thanks

like image 829
Mitciv Avatar asked Aug 08 '11 04:08

Mitciv


3 Answers

You can check the HTTP requests that Pow receives by running tail -f on the log file of your choice in the ~/Library/Logs/Pow directory. Check out the Pow manual section on Viewing Log Files

If you're looking for Rails specific logs, they'll be located in the log/ directory of your application. For instance, if you want to watch the development log for your application switch to the root director of the application and run:

tail -f log/development.log

There's also less which will give you a few more options, but isn't quite as simple to use.

less -R log/development.log

and then press ctrl-f to follow new output to the file. Pressing h will give you a more detailed help menu.

like image 65
Matthew Lehner Avatar answered Oct 23 '22 18:10

Matthew Lehner


You can also use a helper gem like powder. I order to show application log just type powder applog

like image 21
Konstantine Kalbazov Avatar answered Oct 23 '22 19:10

Konstantine Kalbazov


Do you see a log/development.log path in your application? You can typically use that to see what is taking place within Rails. There are also logs for testing and production as well and they might be present for your project depending on the mode that the application is running in.

To access these logs you should use the Terminal and cd to your application, you can then use a utility such as tail to see the logs. A variation of the tail command would also scroll the output when there is new content like the Rails logger normally does.

like image 1
Devin M Avatar answered Oct 23 '22 17:10

Devin M