I've been doing some development with rails 3 and I was wondering why calling the "puts" method doesn't output to standard out.
How do I get this back?
Instead of puts
, use logger.info
:
logger.info @collection.inspect
You can also use the standard ruby way by calling STDOUT << 'your output'
. Method put
is not a rails speciality, it comes with ruby. If you use rails, you can also rely on the logger
object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With