Working on project in Rails 4.0.0, ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin10.8.0], with Rake 10.1.1
I was working on an app for a class in Rails, I made an error and deleted the changes made while in Git. When I went to redo the project, and ran the rake DB migration, I was given the following error message:
Joses-MacBook-Air:crumblr JRV$ rails generate migration CreateHearts Post_id:integer
invoke active_record
create db/migrate/20140120235500_create_hearts.rb
Joses-MacBook-Air:crumblr JRV$ bundle exec rake db:migrate
== CreateHearts: migrating ===================================================
-- create_table(:hearts)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "hearts" already exists: CREATE TABLE "hearts" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "Post_id" integer) /usr/local/rvm/gems/ruby-1.9.3- p392/gems/sqlite3-1.3.8/lib/sqlite3/database.rb:91:in `initialize'
4.0.0/lib/active_record/railties/databases.rake:42:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
How do I get rid of the old table reference?