masteringmodernpayments / book

Discussion group for Mastering Modern Payments
https://www.masteringmodernpayments.com
6 stars 2 forks source link

Just started the basic integration #16

Closed farhan-syed closed 8 years ago

farhan-syed commented 9 years ago

so i do the command createuser -s sales and i get this in return createuser: creation of new role failed: ERROR: role "sales" already exists

peterkeen commented 9 years ago

Should be safe to ignore. Just skip that and go to the next command.

On Jun 16, 2015, at 5:56 PM, farhansyed9 notifications@github.com wrote:

so i do the command createuser -s sales and i get this in return createuser: creation of new role failed: ERROR: role "sales" already exists

— Reply to this email directly or view it on GitHub.

farhan-syed commented 9 years ago

also do i start postgres when i do this basic integration?

farhan-syed commented 9 years ago

after i do rails generate devise:install and then run rake db:migrate i get all this:

== 20150616221459 DeviseCreateUsers: migrating ================================ -- create_table(:users) rake aborted! StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR: relation "users" already exists : CREATE TABLE "users" ("id" serial primary key, "email" character varying DEFAULT '' NOT NULL, "encrypted_password" character varying DEFAULT '' NOT NULL, "reset_password_token" character varying, "reset_password_sent_at" timestamp, "remember_created_at" timestamp, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" timestamp, "last_sign_in_at" timestamp, "current_sign_in_ip" inet, "last_sign_in_ip" inet, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in async_exec' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inblock in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:473:in block in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activesupport-4.2.2/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:467:in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:inexecute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:in create_table' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:662:inblock in method_missing' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:in block in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:insay_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:652:in method_missing' /Users/FarhanSyed/sales/db/migrate/20150616221459_devise_create_users.rb:3:inchange' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:606:in exec_migration' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:inblock (2 levels) in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:inwith_connection' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:in block in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:inblock in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:inwithin_new_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:intransaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:inexecute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:ineach' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:inup' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>' ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR: relation "users" already exists : CREATE TABLE "users" ("id" serial primary key, "email" character varying DEFAULT '' NOT NULL, "encrypted_password" character varying DEFAULT '' NOT NULL, "reset_password_token" character varying, "reset_password_sent_at" timestamp, "remember_created_at" timestamp, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" timestamp, "last_sign_in_at" timestamp, "current_sign_in_ip" inet, "last_sign_in_ip" inet, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inasync_exec' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in block in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:473:inblock in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activesupport-4.2.2/lib/active_support/notifications/instrumenter.rb:20:in instrument' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:467:inlog' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:increate_table' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:662:in block in method_missing' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:inblock in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:652:inmethod_missing' /Users/FarhanSyed/sales/db/migrate/20150616221459_devise_create_users.rb:3:in change' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:606:inexec_migration' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:in block (2 levels) in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:inblock in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:inblock in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in block in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:inblock in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:in within_new_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:intransaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:inddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:inblock in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in each' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:in up' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:inblock (2 levels) in <top (required)>' PG::DuplicateTable: ERROR: relation "users" already exists /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in async_exec' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inblock in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:473:in block in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activesupport-4.2.2/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:467:in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:inexecute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:in create_table' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:662:inblock in method_missing' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:in block in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:insay_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:652:in method_missing' /Users/FarhanSyed/sales/db/migrate/20150616221459_devise_create_users.rb:3:inchange' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:606:in exec_migration' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:inblock (2 levels) in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:inwith_connection' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:in block in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:inblock in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:inwithin_new_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:intransaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:inexecute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:ineach' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:inup' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/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)

peterkeen commented 9 years ago

Seems like maybe it has partially run this stuff at least once before. You could try db:reset which will completely destroy and recreate the database.

On Jun 16, 2015, at 6:16 PM, farhansyed9 notifications@github.com wrote:

after i do rails generate devise:install and then run rake db:migrate i get all this:

== 20150616221459 DeviseCreateUsers: migrating ================================ -- create_table(:users) rake aborted! StandardError: An error has occurred, this and all later migrations canceled:

PG::DuplicateTable: ERROR: relation "users" already exists : CREATE TABLE "users" ("id" serial primary key, "email" character varying DEFAULT '' NOT NULL, "encrypted_password" character varying DEFAULT '' NOT NULL, "reset_password_token" character varying, "reset_password_sent_at" timestamp, "remember_created_at" timestamp, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" timestamp, "last_sign_in_at" timestamp, "current_sign_in_ip" inet, "last_sign_in_ip" inet, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in async_exec' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inblock in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:473:in block in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activesupport-4.2.2/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:467:in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:inexecute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:in create_table' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:662:inblock in method_missing' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:in block in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:insay_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:652:in method_missing' /Users/FarhanSyed/sales/db/migrate/20150616221459_devise_create_users.rb:3:inchange' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:606:in exec_migration' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:inblock (2 levels) in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:inwith_connection' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:in block in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:inblock in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:inwithin_new_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:intransaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:inexecute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:ineach' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:inup' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>' ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR: relation "users" already exists : CREATE TABLE "users" ("id" serial primary key, "email" character varying DEFAULT '' NOT NULL, "encrypted_password" character varying DEFAULT '' NOT NULL, "reset_password_token" character varying, "reset_password_sent_at" timestamp, "remember_created_at" timestamp, "sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at" timestamp, "last_sign_in_at" timestamp, "current_sign_in_ip" inet, "last_sign_in_ip" inet, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL) /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inasync_exec' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in block in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:473:inblock in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activesupport-4.2.2/lib/active_support/notifications/instrumenter.rb:20:in instrument' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:467:inlog' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:increate_table' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:662:in block in method_missing' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:inblock in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:652:inmethod_missing' /Users/FarhanSyed/sales/db/migrate/20150616221459_devise_create_users.rb:3:in change' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:606:inexec_migration' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:in block (2 levels) in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:inblock in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:inblock in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in block in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:inblock in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:in within_new_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:intransaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:inddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:inblock in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in each' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:in up' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:inblock (2 levels) in ' PG::DuplicateTable: ERROR: relation "users" already exists /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:in async_exec' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:155:inblock in execute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:473:in block in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activesupport-4.2.2/lib/active_support/notifications/instrumenter.rb:20:ininstrument' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract_adapter.rb:467:in log' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/postgresql/database_statements.rb:154:inexecute' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:208:in create_table' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:662:inblock in method_missing' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:in block in say_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:632:insay_with_time' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:652:in method_missing' /Users/FarhanSyed/sales/db/migrate/20150616221459_devise_create_users.rb:3:inchange' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:606:in exec_migration' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:590:inblock (2 levels) in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:589:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:inwith_connection' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:588:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:765:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:995:in block in execute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:inblock in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:188:inwithin_new_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/transactions.rb:220:intransaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:1041:in ddl_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:994:inexecute_migration_in_transaction' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:956:in block in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:ineach' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:952:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:820:inup' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/migration.rb:798:in migrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/tasks/database_tasks.rb:137:inmigrate' /Users/FarhanSyed/.gem/ruby/2.2.2/gems/activerecord-4.2.2/lib/active_record/railties/databases.rake:44:in `block (2 levels) in ' Tasks: TOP => db:migrate (See full trace by running task with --trace)

— Reply to this email directly or view it on GitHub.