As other have said, you want to use either puts
or p
. Why? Is that magic?
Actually not. A rails console is, under the hood, an IRB, so all you can do in IRB you will be able to do in a rails console. Since for printing in an IRB we use puts
, we use the same command for printing in a rails console.
You can actually take a look at the console code in the rails source code. See the require of irb? :)