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:in `add_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:in `select_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:in `to_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:in `first'
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:in `find_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:in `find'
from (irb):3
on 2010-08-30 20:02
on 2010-09-24 16:50
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 <lists@ruby-forum.com> 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
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.