Search code examples
ruby-on-railsrubyjruby

Tool like BetterErrors for JRuby?


I would like to use BetterErrors, but my project uses JRuby, which is unsupported by BetterErrors. Is there a alternative to the better_errors gem that works on JRuby?

What I want is when I have an error in my app, to be able to see it in the browser and use the REPL from the web.


Solution

  • Your best option is to use web_console which is default in Rail 4.2 .

    Altough the support for jRuby is still experimental, as you can see in the README of the project:

    There is an experimental JRuby 1.7 support. See Installation section for more information.

    If you are running JRuby, you can get experimental support with adding a pre-release version of binding_of_caller.

    group :development do
      gem 'web-console', '~> 2.0'
    
      gem 'binding_of_caller', '0.7.3.pre1'
    end
    

    After you save the Gemfile changes, make sure to run bundle install and restart your server for the Web Console to kick in.