17

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

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138
Mitciv
  • 813
  • 3
  • 15
  • 21

4 Answers4

28

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.

Matthew Lehner
  • 3,967
  • 3
  • 26
  • 35
11

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

Konstantine Kalbazov
  • 2,643
  • 26
  • 29
  • 3
    It would be great to have `binding.pry` accessible from there. – Joshua Muheim Mar 05 '14 at 08:06
  • This is the best answer. `powder` is more than just tailing the log, it gives you the equivalent of the real-time `rails server` display after the initial tail. This is about as similar to Webrick or Thin as you can get. – Chris Beck Mar 11 '14 at 20:04
1

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.

Devin M
  • 9,636
  • 2
  • 33
  • 46
0

Use the pry-remote gem. References: https://github.com/Mon-Ouie/pry-remote https://coderwall.com/p/sreazq

M.R.
  • 1
  • 1