Tuesday, November 04, 2014

How to get web_console working in Rails 4.2.beta4 project

1. Add the gem to Gemfile.

group :development do
  gem 'web-console', '2.0.0.beta3'
end

2. bundle

3. You can go to the web console by going to the URL : http://localhost:3000/console

You will also see the web console on the bottom of the browser. You can experiment with the Rails environment loaded.

4. You can add "<%= console %>" to any views and play with the web console.

If you restart the server. You need to reload the page to get a new active console session.

For more details : Web Console Ruby Gem