I found the "real" problem in /var/log/postgresql/postgresql-8.2-
main.log. It was actually an error on the previous sql statement. This
seems like a rails bug to me, and a really annoying one. Had me off-
track for awhile.
lesson: don''t count on the rails log files. Check the db log files.
On Aug 28, 10:42 pm, dailer
<d.sai...-Wuw85uim5zDR7s880joybQ@public.gmane.org>
wrote:> getting the error shown below on a simple "find_by_name" for an
active
> record. I''ve seen this with migrations when creating tables with
> "force => true" but never a simple select like this. There is
nothing
> wrong with the sql. It runs fine in pgadmin.
>
> ActiveRecord::StatementInvalid: RuntimeError: ERROR C25P02 Mcurrent
> transaction is aborted, commands
> ignored until end of transaction block Fpostgres.c L859
> Rexec_simple_query: SELECT * FROM destinations WHERE
> (destinations."name" = ''foo bar'') LIMIT 1
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> connection_adapters/abstract_adapte
> r.rb:128:in `log''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> connection_adapters/postgresql_adap
> ter.rb:152:in `execute''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> connection_adapters/postgresql_adap
> ter.rb:433:in `select''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> connection_adapters/abstract/databa
> se_statements.rb:7:in `select_all''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> base.rb:427:in `find_by_sql''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> base.rb:997:in `find_every''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> base.rb:991:in `find_initial''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> base.rb:1204:in `send''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> base.rb:1204:in `method_missing''
> /var/lib/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
> deprecation.rb:44:in `silence''
> /var/lib/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
> base.rb:1204:in `method_missing''
> /home/dsailer/aptana/workspace/OrbRuby/config/../lib/juniper/
> stats_helper.rb:41
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---