0

I am trying to learn Ruby, thus far have been breezing through for a few days but finally really stuck on this error message:

$ rake db:migrate
==CreatePins: migrating =====
--create_table<:pins>
rake aborted!
An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: table "pins" already exists: CREATE TABLE "pins" <"id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "description" varchar<255>, "created_at" datetime, "updated_at" datetime> C:/users/xxx/xxx/xxx/xxx/xxx/xxx/##########_create_pins.rb:3:in 'change'
c:in 'migrate'
Tasks: TOP => db:migrate
<See full trace by running task with --trace>

I've tried rake db:rollback, rake db:rollback STEP=2, going into individual files and eliminating anything that has any resemblance to pins/pins table. Perhaps I did something wrong with git push or push heroku?? Thoughts?

2 Answers2

2

Try rake db:reset i hope its work for you. If it not work than you have 2 migration file for same table pins delete anyone and again run rake db:reset

Divyang Hirpara
  • 998
  • 4
  • 23
0

I have the same problem with you ,I work it out by adding "drop_table:pins" at my create_pins.rb

Duoduo
  • 1