The difference between the two is that the latter adds a new line character.
Ruby console log.
The console command lets you interact with your rails application from the command line.
I ve got a ruby statement that generates lots of prints 8k lines and i d like to be able to see it completely but the console only remembers the last 1024 lines or so.
5 debugging memory leaks.
See even though the demo app logs to a file there s nothing preventing you from logging to a variety of targets such as the database the console or even an online service.
Enter the logging framework.
When working on the js for bugsnag i kept accidentally typing console log into rails.
Log a message when a console rendering is prevented defaults.
Usr bin ruby print apple print apple n puts orange puts orange the print and puts methods produce textual output on the console.
Using console log lets you easily see only log messages in this request.
So i thought about redirecting to a file if anyone knows a better option i m all ears.
Since web console evaluates plain ruby code remotely on the server don t try to use it in production.
It was designed to give you as quick a start on the ruby logging world as humanly possible.
Think about our toy app.