1

rake db:migrate コマンドを実行すると、次のエラーが発生し続けます。

レーキが中止されました! エラーが発生しました。これ以降の移行はすべてキャンセルされました: SQLite3::SQLException: 列名が重複しています: email: ALTER TABLE "users" ADD "email" varchar(255) DEFAULT '' NOT NULL

コマンドも試しました-bundle exec rake db:migrate。--trace で実行し、情報を取得しました。下。

** db:migrate の呼び出し (first_time) ** 環境の呼び出し (first_time) ** 環境の実行 ** db:load_config の呼び出し (first_time) ** db:load_config の実行 ** db:migrate の実行 == AddDeviseToUsers: migrating ==== ========================================== -- change_table(:users)レーキが中止されました! エラーが発生しました。これ以降の移行はすべてキャンセルされました:

SQLite3::SQLException: 列名が重複しています: email: ALTER TABLE "users" ADD "email" varchar(255) DEFAULT '' NOT NULL /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sqlite3- 1.3.7/lib/sqlite3/database.rb:91:initialize' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:91:in新しい '/usr/local/rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/database.rb: 91:in prepare' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/sqlite3-1.3.7/lib/sqlite3/database.rb:134:inexecute' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/sqlite_adapter.rb:278:in block in execute' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:280:inblock in log' /usr/ local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.12/lib/active_support/notifications/instrumenter.rb:20:in instrument' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_adapter.rb:275:inlog' /usr/local/rvm/gems/ruby-1.9. 3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/sqlite_adapter.rb:278:inexecute' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/schema_statements.rb:264:inadd_column' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/sqlite_adapter.rb:400:in add_column' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/schema_definitions.rb:479:inblock in string' /usr/local/rvm /gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/schema_definitions.rb:468:in each' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/schema_definitions.rb:468:instring' /Users/ddorrick/code/onrails/db/migrate/20130321170702_add_devise_to_users .rb:5:in block in up' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/schema_statements.rb:243:inchange_table' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:466:in block in method_missing' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:438:inblock in say_with_time' /usr /local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/benchmark.rb:280:in measure' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:438:insay_with_time' /usr/local/rvm/gems/ruby-1.9.3-p392/gems /activerecord-3.2.12/lib/active_record/migration.rb:458:inmethod_missing' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:334:inmethod_missing' /Users/ddorrick/code/onrails/db/migrate/20130321170702_add_devise_to_users.rb:3:in up' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:370:inup' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib /active_record/migration.rb:410:in block (2 levels) in migrate' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/benchmark.rb:280:inmeasure' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:410:in block in migrate' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_pool.rb:129:inwith_connection' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:389:in migrate' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:528:inmigrate' /usr/local/rvm/gems/ruby-1.9 .3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:720:in block (2 levels) in migrate' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:incall' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12 /lib/active_record/migration.rb:775:in block in ddl_transaction' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/database_statements.rb:192:intransaction' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/transactions.rb:208:intransaction' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:775:inddl_transaction' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:719:in block in migrate' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:700:ineach' /usr/local/rvm/gems/ruby -1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:700:in migrate' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/migration.rb:570:inup' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2 .12/lib/active_record/migration.rb:551:inmigrate' /usr/local/rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.12/lib/active_record/railties/databases.rake:179:inブロック (2 レベル) in ' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/ rake/task.rb:228: in call' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/task.rb:228:inblock in execute' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/task.rb:223: in each' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/task.rb:223:inexecute' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/task.rb:166:in block in invoke_with_call_chain' /usr/local/rvm/rubies/ruby-1.9.3-p392/lib/ruby/1.9.1/monitor.rb:211:inmon_synchronize' /usr/local/rvm/ gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/task.rb:159:ininvoke_with_call_chain' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/task.rb:152:ininvoke' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:143:in invoke_task' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:101:inblock (2 levels) in top_level' /usr /local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:101:in each' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:101:inblock in top_level' /usr/local/rvm/gems/ruby -1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:110:in run_with_threads' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:95:intop_level' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems /rake-10.0.3/lib/rake/application.rb:73:in block in run' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake/application.rb:160:instandard_exception_handling' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/lib/rake /application.rb:70:in run' /usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/rake-10.0.3/bin/rake:33:in' /usr/local/rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in load' /usr/local/rvm/gems/ruby-1.9.3-p392@global/bin/rake:19:in' /usr/local/rvm/gems/ruby-1.9.3 -p392/bin/ruby_noexec_wrapper:14:in eval' /usr/local/rvm/gems/ruby-1.9.3-p392/bin/ruby_noexec_wrapper:14:in' タスク: TOP => db:migrate

4

1 に答える 1