Am 17.03.2011 21:25, schrieb Mario Camou:
> Sorry for the dupes, GMail was doing a Reply to All instead of just a Reply.
> 
> I've just tried running the small example from the web interface in a
> vanilla Ruote install and it works correctly. I've also tried running on a
> minimal environment based on our runtime environment and it works too. So my
> guess is that it has something to do with the way we're setting up our
> production Ruote. My money is on ActiveSupport which has bitten us
> previously (and which I need since I'm using ActiveRecord).
> 
> I surrounded the offending return statements with begin..rescue blocks and
> added pp's to get the output of the commands. It seems that you're right,
> Rufus::Json.decode is NOT throwing an exception as it should, it's just
> returning the String it's passed in (i.e., the filename)
> 
> Diving into Rufus::Json it looks like the backend it's using is the
> ActiveSupport::JSON decoder, and ActiveSupport::JSON.decode is actually
> returning the entered String instead of throwing an exception.

ActiveSupport::JSON.decode accepts non-JSON strings as input…

> Weird thing
> is, if I go to a vanilla Ruote/RuoteKit install and do a "require
> 'active_record'" in the config.ru, everything works fine. I've tried putting
> it at the beginning, right before/after the "require 'rufus-json'" and at
> the end.
> 
> At the moment I'm stumped....

You can tell rufus-json which backend to use. Install json-jruby,
require it before rufus-json. After the rufus-json require, you can call
  Rufus::Json.backend = :json
to use the json-jruby gem.

I hope that helps.

Cheers,
Torsten

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to