'exceptional test' fails with json error

Stian Grytøyr's Avatar

Stian Grytøyr

19 Nov, 2010 09:09 AM

On the final step of the install procedure ('exceptional test'), I get the error below:

$ gem list | grep -i json json (1.4.3, 1.1.9)
json_pure (1.4.6, 1.2.0)

$ exceptional test /Library/Ruby/Gems/1.8/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 /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/remote.rb:20:in `error'
    from /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/integration/tester.rb:10:in `test'
    from /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/bin/exceptional:31
    from /usr/bin/exceptional:19:in `load'
    from /usr/bin/exceptional:19

What to do? As you can see I have installed the json_pure gem.

  1. 1 Posted by Stian Grytøyr on 19 Nov, 2010 09:11 AM

    Stian Grytøyr's Avatar

    Oops, let me just format that error mesage a little better:

    /Library/Ruby/Gems/1.8/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 /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/remote.rb:20:in `error'
        from /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/integration/tester.rb:10:in `test'
        from /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/bin/exceptional:31
        from /usr/bin/exceptional:19:in `load'
        from /usr/bin/exceptional:19
  2. 2 Posted by Stian Grytøyr on 19 Nov, 2010 09:18 AM

    Stian Grytøyr's Avatar

    Actually, it has nothing to do with json. Here is the actual error message (that your rescue block eats up..):

    undefined method `iso8601' for Fri Nov 19 09:16:30 UTC 2010:Time
        /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/exception_data.rb:18:in `to_hash'
        /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/exception_data.rb:41:in `to_json'
        /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/remote.rb:20:in `error'
        /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/lib/exceptional/integration/tester.rb:10:in `test'
        /Library/Ruby/Gems/1.8/gems/exceptional-2.0.27/bin/exceptional:31
        /usr/bin/exceptional:19:in `load'
        /usr/bin/exceptional:19
  3. 3 Posted by Stian Grytøyr on 19 Nov, 2010 09:21 AM

    Stian Grytøyr's Avatar

    The immediate workaround was to add "require 'time'" to the top of exception_data.rb, but this seems a little broken and should probably be fixed in the gem?

  4. 4 Posted by Ciaran Lee on 22 Nov, 2010 04:31 PM

    Ciaran Lee's Avatar

    Hi Stian,
    Thanks for pointing this out. I have fixed this in the latest version of the exceptional gem (2.0.28).
    Regards,
    Ciaran Lee

  5. Ciaran Lee closed this discussion on 22 Nov, 2010 04:31 PM.

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

Keyboard shortcuts

Generic

? 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