All - I''m using ActiveRecord outside of the rails framework and I''m having an issue using the class method count. I''m connected to an Oracle 10g database and my find commands are working fine: Employee.find(:first) -> Gives me the first record just as expected However, when I try: Employee.count I get the following error: irb(main):004:0> Employee.count ActiveRecord::ConnectionNotEstablished: ActiveRecord::ConnectionNotEstablished I literally did these lines one after another in the same irb session. Bizarre... Thanks, Drew -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Tue, Mar 06, 2007 at 07:23:53PM +0100, Drew Olson wrote :> irb(main):004:0> Employee.count > ActiveRecord::ConnectionNotEstablished: > ActiveRecord::ConnectionNotEstablishedWhat''s your Rails version? You need to have ActiveRecord::Calculations module (Rails > 1.1). Do you have output debug from the db? -- ,========================. | Pierre-Alexandre Meyer | | email : pam-1sEOgp2Wo8Qdnm+yROfE0A@public.gmane.org | `========================'' --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Drew Olson wrote:> All - > > I''m using ActiveRecord outside of the rails framework and I''m having an > issue using the class method count. I''m connected to an Oracle 10g > database and my find commands are working fine: > > Employee.find(:first) -> Gives me the first record just as expected > > However, when I try: > > Employee.count > > I get the following error: > > irb(main):004:0> Employee.count > ActiveRecord::ConnectionNotEstablished: > ActiveRecord::ConnectionNotEstablished > > I literally did these lines one after another in the same irb session. > Bizarre... > > Thanks, > DrewI''m having the same problem. Did you ever find a solution? Earle -- 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---