Skip to content

Instantly share code, notes, and snippets.

@cdesch
Created August 30, 2015 22:24
Show Gist options
  • Save cdesch/e0b6dc757cc56135427e to your computer and use it in GitHub Desktop.
Save cdesch/e0b6dc757cc56135427e to your computer and use it in GitHub Desktop.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@192.168.1.112: rake exit status: 1
rake stdout: == 20150817191541 CreateBookStoreBooks: migrating =============================
-- create_table(:book_store_books)
rake stderr: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "authors" does not exist
: ALTER TABLE "book_store_books" ADD CONSTRAINT "fk_rails_52f80cb3c5"
FOREIGN KEY ("author_id")
REFERENCES "authors" ("id")
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "authors" does not exist
: ALTER TABLE "book_store_books" ADD CONSTRAINT "fk_rails_52f80cb3c5"
FOREIGN KEY ("author_id")
REFERENCES "authors" ("id")
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
PG::UndefinedTable: ERROR: relation "authors" does not exist
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
SSHKit::Command::Failed: rake exit status: 1
rake stdout: == 20150817191541 CreateBookStoreBooks: migrating =============================
-- create_table(:book_store_books)
rake stderr: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "authors" does not exist
: ALTER TABLE "book_store_books" ADD CONSTRAINT "fk_rails_52f80cb3c5"
FOREIGN KEY ("author_id")
REFERENCES "authors" ("id")
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "authors" does not exist
: ALTER TABLE "book_store_books" ADD CONSTRAINT "fk_rails_52f80cb3c5"
FOREIGN KEY ("author_id")
REFERENCES "authors" ("id")
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
PG::UndefinedTable: ERROR: relation "authors" does not exist
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Tasks: TOP => deploy:migrate
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@192.168.1.112: rake exit status: 1
rake stdout: == 20150817191541 CreateBookStoreBooks: migrating =============================
-- create_table(:book_store_books)
rake stderr: rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::UndefinedTable: ERROR: relation "authors" does not exist
: ALTER TABLE "book_store_books" ADD CONSTRAINT "fk_rails_52f80cb3c5"
FOREIGN KEY ("author_id")
REFERENCES "authors" ("id")
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "authors" does not exist
: ALTER TABLE "book_store_books" ADD CONSTRAINT "fk_rails_52f80cb3c5"
FOREIGN KEY ("author_id")
REFERENCES "authors" ("id")
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
PG::UndefinedTable: ERROR: relation "authors" does not exist
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `async_exec'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in `block in execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in `execute'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:762:in `add_foreign_key'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:217:in `block in create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `each_pair'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/schema_statements.rb:216:in `create_table'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:661:in `block in method_missing'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `block in say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:631:in `say_with_time'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:651:in `method_missing'
/home/deploy/apps/saturnalia_books/releases/20150830213342/db/migrate/20150817191541_create_book_store_books.book_store.rb:4:in `change'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:605:in `exec_migration'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:589:in `block (2 levels) in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:588:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in `with_connection'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:587:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:764:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:994:in `block in execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `block in ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/transactions.rb:220:in `transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:1040:in `ddl_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:993:in `execute_migration_in_transaction'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:955:in `block in migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `each'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:819:in `up'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/migration.rb:797:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/tasks/database_tasks.rb:137:in `migrate'
/home/deploy/apps/saturnalia_books/shared/bundle/ruby/2.2.0/gems/activerecord-4.2.3/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
cjsMBP15:saturnalia_books cj$
@mazharoddin
Copy link

Hi,
I am also facing exactly similar error with postgresql, but same migration works fine in sqlite3.

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

PG::UndefinedTable: ERROR:  relation "tags" does not exist
: ALTER TABLE "blog_taggings" ADD CONSTRAINT "fk_rails_97c792ad84"
FOREIGN KEY ("tag_id")
  REFERENCES "tags" ("id")

Please let me know if you were able to fix this issue.

@mazharoddin
Copy link

Hi,
I am also facing exactly similar error with postgresql, but same migration works fine in sqlite3.

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

PG::UndefinedTable: ERROR:  relation "tags" does not exist
: ALTER TABLE "blog_taggings" ADD CONSTRAINT "fk_rails_97c792ad84"
FOREIGN KEY ("tag_id")
  REFERENCES "tags" ("id")

Please let me know if you were able to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment