annotate_models
annotate_models copied to clipboard
annotate but not working
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
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 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 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.
Since I upgraded my app to annotate 3, it also seems like my task in
auto_annotate_models.rakedoesn'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.