Problem using JRuby with Rails3 and Sql Server 2008

I’ve tried using JRuby with Rails 2.3.8 and Sql Server 2008 and
everything is smooth. But I’m facing some problems with Rails 3.

Here’s an error that I get when I try to find a post by id. However if I
find all the posts, i.e. ‘Post.find.all’ then it still works but
‘Post.find(1)’ generate the following error.

Is activerecord-jdbcmssql-adapter ready for Rails3?

Has anyone been able to use JRuby, Rails3 and Sql Server; any
recommendations?

Thanks

irb(main):003:0> Post.find(1)
RuntimeError: can’t determine table name
from
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9
.7-java/lib/jdbc_adapter/jdbc_mssql.rb:455:in determine_order_clause' from c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9 .7-java/lib/jdbc_adapter/jdbc_mssql.rb:241:inadd_limit_offset!’
from
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/engines/s
ql/relations/compiler.rb:50:in build_clauses' from c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/engines/s ql/relations/compiler.rb:26:inselect_sql’
from
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/arel-1.0.1/lib/arel/algebra/r
elations/relation.rb:42:in to_sql' from c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active _record/relation.rb:64:into_a’
from
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active
_record/relation/finder_methods.rb:333:in find_first' from c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active _record/relation/finder_methods.rb:122:infirst’
from
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active
_record/relation/finder_methods.rb:291:in find_one' from c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active _record/relation/finder_methods.rb:281:infind_with_ids’
from
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-3.0.0/lib/active
_record/relation/finder_methods.rb:107:in find' from c:0:infind’
from (irb):3

Try downloading and installing a beta gem from
http://ci.jruby.org/job/activerecord-jdbc-master/lastSuccessfulBuild/artifact/pkg/.
We’ve got lots of good mssql fixes in store for 1.0 that should fix
the issue that you’re having.

Thanks for your patience!

/Nick

On Mon, Aug 30, 2010 at 1:02 PM, Somchok Sakjiraphong
[email protected] wrote:

recommendations?
c:/jruby-1.5.2/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9
from
_record/relation/finder_methods.rb:291:in `find_one’


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs