Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After upgrading to rails 4.1, acts-as-taggable-on is not working

I have upgraded my rails version of one my app to 4.1.0. While upgrading I have upgraded all gems from Gemfile, which upgraded acts-as-taggable-on to 3.1.1 too.

but after upgrade, when I tried to add tags on respective object, it is failing with following error.

  post = Post.last
  post.tag_list = "development"
  post.save

ERROR: column "taggings_count" does not exist

details error is here:

SQL (0.9ms)  UPDATE "tags" SET "taggings_count" = COALESCE("taggings_count", 0) - 1 WHERE "tags"."id" = 3146
PG::UndefinedColumn: ERROR:  column "taggings_count" does not exist
LINE 1: UPDATE "tags" SET "taggings_count" = COALESCE("taggings_coun...
                                                      ^
: UPDATE "tags" SET "taggings_count" = COALESCE("taggings_count", 0) - 1 WHERE "tags"."id" = 3146
   (0.3ms)  ROLLBACK
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "taggings_count" does not exist
LINE 1: UPDATE "tags" SET "taggings_count" = COALESCE("taggings_coun...
                                                      ^
: UPDATE "tags" SET "taggings_count" = COALESCE("taggings_count", 0) - 1 WHERE "tags"."id" = 3146
like image 986
Rahul Chaudhari Avatar asked Apr 23 '14 09:04

Rahul Chaudhari


1 Answers

just we have to do,

rake acts_as_taggable_on_engine:install:migrations

Since acts-as-taggable-on has added new migrations.

like image 101
Rahul Chaudhari Avatar answered Oct 24 '22 07:10

Rahul Chaudhari