exceptional test failed - Object.to_json not defined

Boblin's Avatar


11 Nov, 2010 02:30 PM

I am trying to get started using exceptional with Rails 3.0.1 (ruby ree-1.8.7-2010.02). After first test I see:

$ exceptional test /home/blin/.rvm/gems/ree-1.8.7-2010.02/gems/exceptional-2.0.27/lib/exceptional/exception_data.rb:45:in `to_json': You need a json gem/library installed to send errors to Exceptional (Object.to_json not defined). (StandardError) Install json_pure, yajl-ruby, json-jruby, or the c-based json gem

from /home/boblin/.rvm/gems/ree-1.8.7-2010.02/gems/exceptional-2.0.27/lib/exceptional/remote.rb:20:in `error'
from /home/boblin/.rvm/gems/ree-1.8.7-2010.02/gems/exceptional-2.0.27/lib/exceptional/integration/tester.rb:10:in `test'
from /home/boblin/.rvm/gems/ree-1.8.7-2010.02/gems/exceptional-2.0.27/bin/exceptional:31
from /home/boblin/.rvm/gems/ree-1.8.7-2010.02/bin/exceptional:19:in `load'
from /home/boblin/.rvm/gems/ree-1.8.7-2010.02/bin/exceptional:19

I tried to install json_pure and json gem and also include them to Gemfile, but it not helps.

How to solve this?


  1. 1 Posted by Ciaran Lee on 12 Nov, 2010 03:30 PM

    Ciaran Lee's Avatar

    Hi Boblin,
    Do you have exceptional in your Gemfile, and have you run bundler? It should always work with rails 3 if you do this.
    Kind regards,
    Ciaran Lee

  2. 2 Posted by Michal Fojtik on 13 Nov, 2010 03:33 PM

    Michal Fojtik's Avatar


    You can try this:

    1. vim "/usr/lib64/ruby/gems/1.8/gems/exceptional-2.0.27/lib/exceptional/exception_data.rb"
    2. add "require 'time'" on top of this file.

    For it fixed the issue.

  3. 3 Posted by Ciaran Lee on 22 Nov, 2010 04:27 PM

    Ciaran Lee's Avatar

    Hi guys,
    I have fixed this issue in the latest build of exceptional (2.0.28).
    Best regards,
    Ciaran Lee

  4. Ciaran Lee closed this discussion on 22 Nov, 2010 04:27 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac