rocket_tag
rocket_tag copied to clipboard
Rocket Tag gem uninstalled, but on rake db:migrate, continues to create tables and error
Hello -
I upgraded from Rails 3.2 to Rails 4, and since RocketTag isn't yet compatible, I uninstalled it and removed the reference from my Gemfile.
However, now I'm getting errors when I run rake db:migrate:
-------- begin paste from Terminal -----------
== RocketTagMigration: migrating ============================================= -- create_table(:tags) rake aborted! An error has occurred, this and all later migrations canceled:
PG::DuplicateTable: ERROR: relation "tags" already exists
-------- end paste from Terminal ---------------
I can't deploy. The "taggings" table is also created and causes same error. Even when I manually delete the tables, they come back. I have even deleted the references to these tables from my schema.rb. Where is this coming from and how can I stop it?
Thank you, Deborah
you deleted files with migrations?
No, I deleted the references to the rocket tag tables in the migrations files.
I've actually fixed the issue now, but it seems like when the Gem is uninstalled, it ought to remove the commands to create its tables, especially since these can conflict with posts or other tagging gems.
Ok, you delete references, but not delete tables.
create a migration: rails g migration drop_tables
and in this file write:
drop_table :table_names