i want to print some variant value on console or logs then i can check is there 开发者_如何学Pythonsomething wrong, i tried puts & print ,i didn't find output info,how to solve this,thanks,i'm new on rails
puts and print will output code in the console for code run in the console. A better method usually is to use the built in logging. For logging that you only want recorded in development, you can use the "logger.debug()" method. Just pass in a string as an argument and look for the results in log/development.log
logger.debug("Time.now is #{Time.now}")
Something like that.
精彩评论