SQLite3::SQLException: duplicate column name while

2019-04-01 01:07发布

问题:

I am currently following the Ruby on Rails Tutorial and I am at https://www.railstutorial.org/book/updating_and_deleting_users#sec-administrative_users Every time I run bundle exec rake db:migrate I get the following error:

SQLite3::SQLException: duplicate column name: remember_digest: ALTER TABLE "users" ADD   "remember_digest" varchar/home/mclacs14/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/sqlite3-1.3.9/lib/sqlite3/database.rb:91:in `initialize'

回答1:

try migrating your DB to version=0 with command: rake db:migrate VERSION=0

and then run rake db:migrate