Hi John,

I commented out the lines in 'vendor/ruote/lib/openwfe/extras/
singlecon.rb' as you suggested in the last post and most of the the
tests pass now with jruby1.3.0

Only, 'test/st_errors.rb' and 'test/st_expressions.rb' still fail
because XML problems I think... I'll try to find more on that and fix
it.


On the other hand, my co-worker Nando found an issue when requesting
"GET /history" (ruote-rest + jruby). It seems that using jdbcmysql
adapter makes SQL queries not to return a Mysql::Request object but a
simple Hash. When the method fetch_row is invoked on that Hash, an
error rises.

We came out with the following fix for that.
Edit 'lib/res/history.rb'

 70  #total = ActiveRecord::Base::connection.execute(
 71  #  'select count(*) from history').fetch_row[0].to_i
 72
 73  total = ActiveRecord::Base::connection.execute('select count(*)
from history')
 74  total = total.respond_to?("fetch_row") ? total.fetch_row
[0].to_i : total.fetch(0).fetch("count(*)").to_i


Now the code above will work fine whether you run ruote-rest with ruby
or with jruby :)

Best regards.
Gonzalo.



On Jun 22, 9:53 am, Gonzalo <[email protected]> wrote:
> Great!
> I will give those threads a look and, whether I find something
> interesting I'll let you know.
>
> Regards,
> Gonzalo.
>
> On Jun 20, 12:22 am, John Mettraux <[email protected]> wrote:
>
> > On Sat, Jun 20, 2009 at 1:09 AM, Gonzalo<[email protected]> wrote:
>
> > > It seems that it has something to do with ActiveRecord and that a
> > > connection can't be established... but I was able to run ruote-rest
> > > (create proccesses, update workitems, etc...) just fine with jruby
> > > using 'jruby lib/start.rb' command :(
>
> > > Is anyone facing the same issue? Thanks for the help.
>
> > Hi Gonzalo,
>
> > yes, this issue has already been seen. A bit of searching and :
>
> >  http://groups.google.com/group/openwferu-users/browse_frm/thread/4d7f...
> >  http://groups.google.com/group/openwferu-users/browse_frm/thread/a802...
>
> > It seems that modifying lib/openwfe/extras/singlecon.rb so that it becomes :
>
> >  http://gist.github.com/132922
>
> > could help.
>
> > I haven't had time to look at this more and those discussion threads
> > went nowhere as my questions were not answered.
>
> > I'd be glad to help, best regards
>
> > --
> > John Mettraux   -  http://jmettraux.wordpress.com
>
>
--~--~---------~--~----~------------~-------~--~----~
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