Using log messages in Rails can be a huge timesaver when you are debugging. With Rconsole you can save even more time by having those messages appear in the browser console. Rconsole is a fairly new gem with a lot of potential.
Installation is super simple. First add it to your
group :development do
gem 'rconsole', '~> 0.1.0'
bundle install. Add to your layout view:
To use Rconsole simply add
rconsole.log messages where you would normally insert
rconsole.log 'Hello, Changeloggers!'
Now your browser will display your messages:
In addition to debugging, Rconsole is particularly useful when working with students or new rubyists to show the connection between what's happening in the controller and the view.
The entire code base is open source and available on GitHub.