Guest User

Untitled

a guest
Jun 22nd, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. Loading development environment (Rails 2.3.2)
  2. c = Category.all
  3. c >> c = Category.all
  4. => [#<Category id: 1, category: "bar / club", permalink: "bar-club", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 2, category: "venue / arena", permalink: "venue-arena", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 3, category: "outdoors", permalink: "outdoors", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 4, category: "gallery", permalink: "gallery", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>, #<Category id: 5, category: "private venue/house", permalink: "private-venuehouse", created_at: "2009-06-24 04:45:20", updated_at: "2009-06-24 04:45:20", deleted_at: nil>]
  5. >> c = Category.find(:all, :group => "category")
  6. ActiveRecord::StatementInvalid: RuntimeError: ERROR C42803 Mcolumn "categories.id" must appear in the GROUP BY clause or be used in an aggregate function Fparse_agg.c L330 Rcheck_ungrouped_columns_walker: SELECT * FROM "categories" WHERE (categories.deleted_at IS NULL OR categories.deleted_at > '2009-06-24 09:07:09.025047') GROUP BY category
  7. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract_adapter.rb:212:in `log'
  8. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:507:in `execute'
  9. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:985:in `select_raw'
  10. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/postgresql_adapter.rb:972:in `select'
  11. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
  12. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all'
  13. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:661:in `find_by_sql'
  14. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:1553:in `find_every_with_deleted'
  15. from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb:162:in `find_every'
  16. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:2148:in `with_scope'
  17. from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb:148:in `with_deleted_scope'
  18. from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid.rb:162:in `find_every'
  19. from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.2/lib/active_record/base.rb:615:in `find_without_find_wrapper'
  20. from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid_find_wrapper.rb:79:in `send'
  21. from /Users/thomas/rails_app/thiswayin/vendor/plugins/acts_as_paranoid/lib/caboose/acts/paranoid_find_wrapper.rb:79:in `find'
  22. from (irb):2
Add Comment
Please, Sign In to add comment