When I try to load my rails app on my local host I get an error telling me to resolve it by running rails db:migrate but when I try to run the command this is what I get
C:\Sites\CoolGuyGear>rails db:migrate == 20180108004216 AddDeviseToViews: migrating ================================= -- change_table(:views) rails aborted! StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: duplicate column name: email: ALTER TABLE "views" ADD "email" varchar DEFAULT '' NOT NULL C:/Sites/CoolGuyGear/db/migrate/20180108004216_add_devise_to_views.rb:7:in block in up' C:/Sites/CoolGuyGear/db/migrate/20180108004216_add_devise_to_views.rb:5:in
up' bin/rails:4:in require' bin/rails:4:in
'
Caused by: ActiveRecord::StatementInvalid: SQLite3::SQLException: duplicate column name: email: ALTER TABLE "views" ADD "email" varchar DEFAULT '' NOT NULL C:/Sites/CoolGuyGear/db/migrate/20180108004216_add_devise_to_views.rb:7:in block in up' C:/Sites/CoolGuyGear/db/migrate/20180108004216_add_devise_to_views.rb:5:in
up' bin/rails:4:in require' bin/rails:4:in
'
Caused by: SQLite3::SQLException: duplicate column name: email C:/Sites/CoolGuyGear/db/migrate/20180108004216_add_devise_to_views.rb:7:in block in up' C:/Sites/CoolGuyGear/db/migrate/20180108004216_add_devise_to_views.rb:5:in
up' bin/rails:4:in require' bin/rails:4:in
' Tasks: TOP => db:migrate (See full trace by running task with --trace)
After reading this blog i very strong in this topics and this blog really helpful to all..Ruby on Rails Online Training
RépondreSupprimer