這是我在終端中得到的錯誤。哪裏不對?
DeviseCreateUsers: migrating
-- create_table(:users) rake aborted! An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "users" already exists: CREATE TABLE
"users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email"
varchar(255) DEFAULT '' NOT NULL, "encrypted_password" varchar(255)
DEFAULT '' NOT NULL, "reset_password_token" varchar(255),
"reset_password_sent_at" datetime, "remember_created_at" datetime,
"sign_in_count" integer DEFAULT 0 NOT NULL, "current_sign_in_at"
datetime, "last_sign_in_at" datetime, "current_sign_in_ip"
varchar(255), "last_sign_in_ip" varchar(255), "created_at" datetime,
"updated_at" datetime)
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/sqlite3-1.3.8/lib/sqlite3/database.rb:91:in `initialize'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/sqlite3-1.3.8/lib/sqlite3/database.rb:91:in `new'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/sqlite3-1.3.8/lib/sqlite3/database.rb:91:in `prepare'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/sqlite3-1.3.8/lib/sqlite3/database.rb:134:in `execute'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:331:in `block in execute'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:435:in `block in log'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activesupport-4.0.2/lib/active_support/notifications/instrumenter.rb:20:in > `instrument'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract_adapter.rb:430:in `log'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:331:in `execute'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:190:in `create_table'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:625:in `block in method_missing'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:597:in `block in say_with_time'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:597:in `say_with_time'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:617:in `method_missing'
/Users/danieljuzovitskij/Desktop/pinteresting/db/migrate/20140205151417_devise_create_users.rb:3:in `change'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:571:in `exec_migration'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:555:in `block (2 levels) in migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:554:in `block in migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:294:in `with_connection'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:553:in `migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:709:in `migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:959:in `block in execute_migration_in_transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:1005:in `block in ddl_transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `block in transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:210:in `within_new_transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:202:in `transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/transactions.rb:209:in `transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:1005:in `ddl_transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:958:in `execute_migration_in_transaction'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:920:in `block in migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:916:in `each'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:916:in `migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:764:in `up'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/migration.rb:742:in `migrate'
/Users/danieljuzovitskij/.rvm/gems/ruby-2.0.0-p353/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate (See > full trace by running task with --trace)
------------------------------------------------------------------------
看起來像表已經創建。檢查文件'db/scheme.rb'並查看用戶表是否存在 –
看起來你已經擁有'users'表。放下它,然後再試一次。 –