Rails 4.2 web console issue

After upgrading to Rails 4.2, I was happy to try the new integrated web console, but I had some problems.

In the release notes for Rails 4.2, he mentions: "New applications built with Rails 4.2 now ship with the default web console gem."

Since I upgraded to 4.2, I assume that I still have to specify it in my Gemfile. Without adding it to your Gemfile, the rails just give me an "undefined local variable or the" console "method, so I assume that it is.

As soon as I added the gem 'web-console', '~> 2.0' to the Gemfile and started the rails server, now I get:

/home/kevin/.rvm/gems/ruby-2.1.5/gems/binding_of_caller-0.7.3.pre1/lib/binding_of_caller/mri2.rb:21:in `callers': uninitialized constant RubyVM::DebugInspector (NameError)
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/better_errors-2.0.0/lib/better_errors/exception_extension.rb:7:in `set_backtrace'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `require'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `each'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:72:in `block in require'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `each'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler/runtime.rb:61:in `require'
  from /home/kevin/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.6/lib/bundler.rb:133:in `require'
  from /home/kevin/workspace/applications/ems-heroes/config/application.rb:6:in `<top (required)>'
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `require'
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:78:in `block in server'
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `tap'
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:75:in `server'
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from /home/kevin/.rvm/gems/ruby-2.1.5/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
  from bin/rails:4:in `require'
  from bin/rails:4:in `<main>'

I googled around and did not find much. Any advice is appreciated.

Thank!

+4
1

, debug_inspector.

: https://github.com/banister/binding_of_caller/issues/39

:

$ gem uninstall debug_inspector
$ bundle install
+5

Source: https://habr.com/ru/post/1568655/


All Articles