質問内容
現在、Railsの勉強としてRailsチュートリアルを進めています。
第七章に入ったところで rake db:migrate のコマンドでエラーが出るようになりました。
rake db:migrate RAILS_ENV = development のコマンドを打っても同じ状態となります。
お手数お掛けしますが、どのようにすれば解決できるかご教授頂けますでしょうか・・・orz
よろしくお願いします。
環境
- Ruby 2.3
- Rails4.2
エラー内容
コマンドライン
text
1$ bundle exec rake db:migrate 2== 20160727230632 CreateUsers: migrating ====================================== 3-- add_index(:users, :email, {:unique=>true}) 4rake aborted! 5StandardError: An error has occurred, this and all later migrations canceled: 6 7SQLite3::SQLException: no such table: main.users: CREATE UNIQUE INDEX "index_users_on_email" ON "users" ("email")
ruby
1# => 20160727230632_create_users.rb 2class CreateUsers < ActiveRecord::Migration 3 def change 4 add_index :users, :email, unique: true 5 create_table :users do |t| 6 t.string :name 7 t.string :email 8 9 t.timestamps null: false 10 end 11 end 12end
WEB画面
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。