I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2 Using activerecord-sqlserver-adapter (3.0.5) windows with sqlserver database when i create user details in rails console, i am getting below error,>User.create(:login=>''test'',:password=>''test123'',:password_confirmation=>''test123'')ActiveRecord::StatementInvalid: ODBC::Error: 37000 (102) [Microsoft][ODBC SQL Se rver Driver][SQL Server]Incorrect syntax near ''LIMIT''.: SELECT [users].[id] FROM [users] WHERE (LOWER([users].[login]) = LOWER(N''test'')) LIMIT 1 from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/connection_adapters/abstract_adapter.rb:202:in `rescue in log'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/connection_adapters/abstract_adapter.rb:194:in `log'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-sqlserver-adapter-3.0 .5/lib/active_record/connection_adapters/sqlserver/database_statements.rb:249:in `raw_select'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-sqlserver-adapter-3.0 .5/lib/active_record/connection_adapters/sqlserver/database_statements.rb:193:in `select'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/connection_adapters/abstract/database_statements.rb:7:in `select_all'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/connection_adapters/abstract/query_cache.rb:56:in `select_all'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/base.rb:467:in `find_by_sql'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/relation.rb:64:in `to_a'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/relation/finder_methods.rb:333:in `find_first'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/relation/finder_methods.rb:122:in `first'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/relation/finder_methods.rb:180:in `exists?'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco rd/validations/uniqueness.rb:39:in `validate_each'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activemodel-3.0.3/lib/active_model /validator.rb:154:in `block in validate'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activemodel-3.0.3/lib/active_model /validator.rb:151:in `each'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activemodel-3.0.3/lib/active_model /validator.rb:151:in `validate'' from c:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_sup port/callbacks.rb:314:in `_callback_before_85'' -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I think this is for your sql server adapter configuration check it On Thu, Jan 6, 2011 at 5:38 PM, Sathiyaraj Gurusamy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> I am using authlogic for authentication in rails 3.0.3 with ruby 1.9.2 > Using activerecord-sqlserver-adapter (3.0.5) > windows with sqlserver database > > when i create user details in rails console, i am getting below error, > > >User.create(:login=>''test'',:password=>''test123'',:password_confirmation=>''test123'') > ActiveRecord::StatementInvalid: ODBC::Error: 37000 (102) > [Microsoft][ODBC SQL Se > rver Driver][SQL Server]Incorrect syntax near ''LIMIT''.: SELECT > [users].[id] FROM > [users] WHERE (LOWER([users].[login]) = LOWER(N''test'')) LIMIT 1 > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/connection_adapters/abstract_adapter.rb:202:in `rescue in log'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/connection_adapters/abstract_adapter.rb:194:in `log'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-sqlserver-adapter-3.0 > > .5/lib/active_record/connection_adapters/sqlserver/database_statements.rb:249:in > `raw_select'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-sqlserver-adapter-3.0 > > .5/lib/active_record/connection_adapters/sqlserver/database_statements.rb:193:in > `select'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/connection_adapters/abstract/database_statements.rb:7:in `select_all'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/connection_adapters/abstract/query_cache.rb:56:in `select_all'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/base.rb:467:in `find_by_sql'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/relation.rb:64:in `to_a'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/relation/finder_methods.rb:333:in `find_first'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/relation/finder_methods.rb:122:in `first'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/relation/finder_methods.rb:180:in `exists?'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.0.3/lib/active_reco > rd/validations/uniqueness.rb:39:in `validate_each'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activemodel-3.0.3/lib/active_model > /validator.rb:154:in `block in validate'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activemodel-3.0.3/lib/active_model > /validator.rb:151:in `each'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activemodel-3.0.3/lib/active_model > /validator.rb:151:in `validate'' > from > c:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_sup > port/callbacks.rb:314:in `_callback_before_85'' > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
More than likely related to this issue: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/closed/#issue/69 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Alpha Blue wrote in post #972808:> More than likely related to this issue: > >https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/closed/#issue/69 Yes. You are correct.. How i am rectify this error?.. Any idea?? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 January 2011 06:02, Sathiyaraj Gurusamy <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Alpha Blue wrote in post #972808: >> More than likely related to this issue: >> >> > https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/closed/#issue/69 > > > Yes. You are correct.. How i am rectify this error?.. Any idea??The details in the link seem quite clear. Go back to Rails 3.0.1 for the moment until the work is complete for 3.0.3. The latest comment in the link (dated 10 hours ago as I write) states that work has started on it. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.