rocket_tag icon indicating copy to clipboard operation
rocket_tag copied to clipboard

Rocket Tag gem uninstalled, but on rake db:migrate, continues to create tables and error

Open deborah-ufw opened this issue 11 years ago • 3 comments

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

deborah-ufw avatar Jan 03 '14 08:01 deborah-ufw

you deleted files with migrations?

fntz avatar Jan 09 '14 07:01 fntz

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.

deborah-ufw avatar Jan 09 '14 07:01 deborah-ufw

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

fntz avatar Jan 09 '14 07:01 fntz