annotate_models icon indicating copy to clipboard operation
annotate_models copied to clipboard

annotate but not working

Open MarcoPonchia opened this issue 5 years ago • 4 comments

I have add annotate to my Gemfile and it install correctly latest version, but when i use bundle exec annotate it seems to run but it not gets or updates any of my models or factories.

Commands

$ bundle exec annotate

Version

  • annotate version: 3.1.1
  • rails version: 6.0.3.1
  • ruby version: 2.7.1

MarcoPonchia avatar Jun 25 '20 10:06 MarcoPonchia

@MarcoPonchia

I did encounter this problem today, on previous versions, I just run bundle exec annotate and everything updates. But on version 3.X, this seems not the case anymore, but upon reading the documentation it says you must explicitly pass --models while annotating.

So the command would be:

bundle exec annotate --models

See: https://github.com/ctran/annotate_models#upgrading-to-3x-and-annotate-models-not-working

dcangulo avatar Jun 28 '20 08:06 dcangulo

@dcangulo Since I upgraded my app to annotate 3, it also seems like my task in auto_annotate_models.rake doesn't work anymore.

Would you have any workaround for this ?

Tao-Galasse avatar Sep 16 '20 16:09 Tao-Galasse

@Tao-Galasse Sorry I don't know much about that. But my auto_annotate_models.rake works just fine and I'm using gem 'annotate', '~> 3.1', '>= 3.1.1' version.

dcangulo avatar Sep 17 '20 05:09 dcangulo

Since I upgraded my app to annotate 3, it also seems like my task in auto_annotate_models.rake doesn't work anymore.

Would you have any workaround for this ?

@Tao-Galasse I had to regenerate the rake file (rails g annotate:install) to get it working again. Bear in mind this overwrites your rakefile so make sure you have any custom options somewhere.

elliotcm avatar Dec 08 '20 15:12 elliotcm