Hi Gonzalo,
yes, this issue has already been seen. A bit of searching and :
http://groups.google.com/group/openwferu-users/browse_frm/thread/4d7fcb0cab66e363
http://groups.google.com/group/openwferu-users/browse_frm/thread/a802c856569c05f8
It seems that modifying lib/openwfe/extras/singlecon.rb so that it becomes :
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
Hello Gonzalo,
OK, understood, waiting for your feedback.
> 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 :)
So, would it be worth reporting the issue to the maintainers of the
jdbc-mysql bridge ?
On the other hand I took a closer look at the active-record
documentation and came up with that modification which happily works
with Ruby and JRuby :
http://github.com/jmettraux/ruote-rest/commit/b52b06c9b2214944c16bf292f460d1f8f429784e
Thanks a lot,
I reported the issue with jdbcmysql-adapter to the jruby guys. Just
for our records:
http://jira.codehaus.org/browse/JRUBY-3772
Regards,
Gonzalo
Hi Gonzalo and Nando,
many thanks for reporting those issues to the JRuby team.
Just as a side note, since Ruote 0.9.20, the default persistence mode
is via Marshal.dump (instead of YAML). It's way faster. The
disadvantage is that the marshal format [may] change[s] from one ruby
to the other (version/platform). I have added a tool (pooltool.ru) for
migration purposes (to/from marshal/yaml).
http://openwferu.rubyforge.org/persistence.html#pooltool
Best regards, keep up the great work,
Hi Li and Nando,
if you need any help on this one, please tell me.
Best regards,