Project

General

Profile

Actions

Defect #3044

closed

running migrate on trunk fails undefined method `transaction_status'

Added by Brendan Beveridge over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2009-03-25
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

Running:

rake db:migrate RAILS_ENV="production" --trace

Against Trunk (r2632)

results in:

==  AddChangesetsUserId: migrating ============================================
-- add_column(:changesets, :user_id, :integer, {:default=>nil})
   -> 0.0037s
==  AddChangesetsUserId: migrated (0.0042s) ===================================

rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `transaction_status' for #<PGconn:0xb7223adc>
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:538:in `transaction_active?'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/postgresql_adapter.rb:560:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions.rb:129:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:554:in `ddl_transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:479:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `each'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:466:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:394:in `up'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb:377:in `migrate'
/usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:111
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:238:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

This is my environment:

ruby script/about
About your application's environment
Ruby version              1.8.5 (i486-linux)
RubyGems version          1.3.1
Rails version             2.2.2
Active Record version     2.2.2
Action Pack version       2.2.2
Active Resource version   2.2.2
Action Mailer version     2.2.2
Active Support version    2.2.2
Application root          /opt/redmine-svn
Environment               development
Database adapter          postgresql
Database schema version   99

Actions #1

Updated by Jean-Philippe Lang over 16 years ago

  • Category set to Database
  • Status changed from New to Closed
  • Resolution set to Wont fix

I'm not able to reproduce and it doesn't seem to be a Redmine defect.
A quick google search gives this Rails ticket:
https://rails.lighthouseapp.com/projects/8994/tickets/996-nomethoderror-undefined-method-transaction_status-for-pgconn0xb719eb0c

Actions #2

Updated by Brendan Beveridge over 16 years ago

Turns out it occurred because i switched from deb packages of rails to using a gem of rails, the version of ruby for postgres was older than what rails expected and had a missing method.

Cheers

Actions

Also available in: Atom PDF