Ask A Question

Notifications

You’re not receiving notifications from this thread.

[HATCH] Error deploying app

Masud Hossain asked in Rails

I'm getting this error when trying to deploy my project with hatch. I made sure I have the RSA file.

Deployment Error

Fetching origin
Warning: Identity file /home/deploy/.ssh/thinkrtc_rsa not accessible: No such file or directory.
Overwriting config/database.yml...
Installing gems...
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.1
Using minitest 5.10.1
Using thread_safe 0.3.6
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 2.0.1
Using nio4r 2.0.0
Using websocket-extensions 0.1.2
Using mime-types-data 3.2016.0521
Using jsonapi-renderer 0.1.2
Using arel 7.1.4
Using public_suffix 2.0.5
Using bcrypt 3.1.11
Using coffee-script-source 1.12.2
Using execjs 2.7.0
Using method_source 0.8.2
Using thor 0.19.4
Using cookiejar 0.3.3
Using daemons 1.2.4
Using eventmachine 1.2.3
Using http_parser.rb 0.6.0
Using multi_json 1.12.1
Using json 1.8.6
Using request_store 1.3.2
Using tilt 2.0.6
Using multi_xml 0.6.0
Using nested_form 0.3.2
Using pg 0.19.0
Using puma 3.7.1
Using rack-cors 0.4.1
Using bundler 1.14.6
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using remotipart 1.3.1
Using sass 3.4.23
Using redis 3.3.3
Using turbolinks-source 5.0.0
Using faker 1.7.3
Using tzinfo 1.2.2
Using nokogiri 1.7.0.1
Using rack-test 0.6.3
Using sprockets 3.7.1
Using websocket-driver 0.6.5
Using mime-types 3.1
Using addressable 2.5.0
Using coffee-script 2.4.1
Using uglifier 3.1.4
Using em-socksify 0.3.1
Using thin 1.7.0
Using haml 4.0.7
Using httparty 0.13.7
Using rails_12factor 0.0.3
Using turbolinks 5.0.1
Using activesupport 5.0.2
Using loofah 2.0.3
Using rack-pjax 1.0.0
Using faye-websocket 0.10.7
Using mail 2.6.4
Using em-http-request 1.1.5
Using pushwoosh 1.0.1
Using rails-dom-testing 2.0.2
Using globalid 0.3.7
Using activemodel 5.0.2
Using case_transform 0.2
Using jbuilder 2.6.3
Using opentok 2.3.4
Using skylight 1.0.1
Using rails-html-sanitizer 1.0.3
Using faye 1.2.4
Using activejob 5.0.2
Using activerecord 5.0.2
Using actionview 5.0.2
Using private_pub 1.0.3
Using acts_as_list 0.9.2
Using friendly_id 5.1.0
Using actionpack 5.0.2
Using actioncable 5.0.2
Using actionmailer 5.0.2
Using active_model_serializers 0.10.5
Using railties 5.0.2
Using gon 6.1.0
Using kaminari 0.17.0
Using meta-tags 2.4.0
Using sprockets-rails 3.2.0
Using coffee-rails 4.2.1
Using font-awesome-rails 4.7.0.1
Using jquery-rails 4.2.2
Using jquery-ui-rails 5.0.5
Using rails 5.0.2
Using sass-rails 5.0.6
Using rails_admin 1.1.1
Bundle complete! 37 Gemfile dependencies, 94 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into /home/deploy/thinkrtc/shared/bundle.
Precompiling assets...
[SKYLIGHT] [1.0.1] Skylight agent enabled
I, [2017-03-22T00:34:54.485242 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/rails_admin/rails_admin-5a3ff98fc95ac99b3f9a2afa536583f8defe82277ad26eedc61ecf40c837fb92.js
I, [2017-03-22T00:34:54.488992 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/rails_admin/rails_admin-5a3ff98fc95ac99b3f9a2afa536583f8defe82277ad26eedc61ecf40c837fb92.js.gz
I, [2017-03-22T00:34:54.586618 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/rails_admin/jquery.colorpicker-3a11f7b1b3e47236ba6d015c2c3cc4a29c600da1136afee9faedefb94412d524.js
I, [2017-03-22T00:34:54.586908 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/rails_admin/jquery.colorpicker-3a11f7b1b3e47236ba6d015c2c3cc4a29c600da1136afee9faedefb94412d524.js.gz
I, [2017-03-22T00:34:55.114850 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/application-af631dd2d8d2d8ddcfa7b4ae66a191a7f5bc5fc08b771a91d5e35f6f32925fab.js
I, [2017-03-22T00:34:55.116075 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/application-af631dd2d8d2d8ddcfa7b4ae66a191a7f5bc5fc08b771a91d5e35f6f32925fab.js.gz
I, [2017-03-22T00:34:55.142056 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/application-7dd308a3f628e9787da0486950bfa7262a0b6dd9a1894b8eb194d3a92c60d8ce.css
I, [2017-03-22T00:34:55.142580 #4084]  INFO -- : Writing /home/deploy/thinkrtc/releases/20170322003438/public/assets/application-7dd308a3f628e9787da0486950bfa7262a0b6dd9a1894b8eb194d3a92c60d8ce.css.gz
Migrating database...
[SKYLIGHT] [1.0.1] Skylight agent enabled
   (0.4ms)  SELECT pg_try_advisory_lock(7446154116381427335);
  ActiveRecord::SchemaMigration Load (1.0ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Migrating to CreatePersonalMessages (20160616153620)
   (8.3ms)  BEGIN
== 20160616153620 CreatePersonalMessages: migrating ===========================
-- create_table(:personal_messages)
   (44.5ms)  CREATE TABLE "personal_messages" ("id" serial primary key, "body" text, "conversation_id" integer, "user_id" integer, "position" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, CONSTRAINT "fk_rails_41ff46a8ff"
FOREIGN KEY ("conversation_id")
  REFERENCES "conversations" ("id")
, CONSTRAINT "fk_rails_1250fcec6d"
FOREIGN KEY ("user_id")
  REFERENCES "users" ("id")
)
   (0.5ms)  ROLLBACK
   (0.6ms)  SELECT pg_advisory_unlock(7446154116381427335)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

PG::UndefinedTable: ERROR:  relation "users" does not exist
: CREATE TABLE "personal_messages" ("id" serial primary key, "body" text, "conversation_id" integer, "user_id" integer, "position" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, CONSTRAINT "fk_rails_41ff46a8ff"
FOREIGN KEY ("conversation_id")
  REFERENCES "conversations" ("id")
, CONSTRAINT "fk_rails_1250fcec6d"
FOREIGN KEY ("user_id")
  REFERENCES "users" ("id")
)
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:846:in `block in method_missing'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:815:in `say_with_time'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:835:in `method_missing'
/home/deploy/thinkrtc/releases/20170322003438/db/migrate/20160616153620_create_personal_messages.rb:3:in `change'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:789:in `exec_migration'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:772:in `block in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:771:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1214:in `block in execute_migration_in_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1282:in `block in ddl_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:211:in `transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1282:in `ddl_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1213:in `execute_migration_in_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1185:in `block in migrate_without_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1184:in `each'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1184:in `migrate_without_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1132:in `block in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1301:in `with_advisory_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1132:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1006:in `up'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:984:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:161:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  relation "users" does not exist
: CREATE TABLE "personal_messages" ("id" serial primary key, "body" text, "conversation_id" integer, "user_id" integer, "position" integer, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, CONSTRAINT "fk_rails_41ff46a8ff"
FOREIGN KEY ("conversation_id")
  REFERENCES "conversations" ("id")
, CONSTRAINT "fk_rails_1250fcec6d"
FOREIGN KEY ("user_id")
  REFERENCES "users" ("id")
)
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:846:in `block in method_missing'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:815:in `say_with_time'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:835:in `method_missing'
/home/deploy/thinkrtc/releases/20170322003438/db/migrate/20160616153620_create_personal_messages.rb:3:in `change'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:789:in `exec_migration'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:772:in `block in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:771:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1214:in `block in execute_migration_in_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1282:in `block in ddl_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:211:in `transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1282:in `ddl_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1213:in `execute_migration_in_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1185:in `block in migrate_without_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1184:in `each'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1184:in `migrate_without_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1132:in `block in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1301:in `with_advisory_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1132:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1006:in `up'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:984:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:161:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
PG::UndefinedTable: ERROR:  relation "users" does not exist
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `async_exec'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:98:in `block in execute'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:589:in `block in log'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activesupport-5.0.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:97:in `execute'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:846:in `block in method_missing'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:815:in `say_with_time'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:835:in `method_missing'
/home/deploy/thinkrtc/releases/20170322003438/db/migrate/20160616153620_create_personal_messages.rb:3:in `change'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:789:in `exec_migration'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:773:in `block (2 levels) in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:772:in `block in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:398:in `with_connection'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:771:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:951:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1214:in `block in execute_migration_in_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1282:in `block in ddl_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:211:in `transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1282:in `ddl_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1213:in `execute_migration_in_transaction'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1185:in `block in migrate_without_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1184:in `each'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1184:in `migrate_without_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1132:in `block in migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1301:in `with_advisory_lock'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1132:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:1006:in `up'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/migration.rb:984:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/tasks/database_tasks.rb:161:in `migrate'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>'
/home/deploy/thinkrtc/shared/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
/home/deploy/.rbenv/versions/2.3.3/bin/bundle:22:in `load'
/home/deploy/.rbenv/versions/2.3.3/bin/bundle:22:in `<main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Reply

PG::UndefinedTable: ERROR: relation "users" does not exist

Looks like maybe you're missing a migration to create the users table somewhere?

Reply

Thanks, Chris!

*Solution: My migration files were out of order. I was making a reference to :users when my user migration files were 3rd place. I changed the dates so users are created first, and done. *

Reply

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 82,464+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.