Model annotation
Jul 2, 2011 • posted by Michael Hartl
A helpful reader has noted that the annotate-models gem used by the Ruby on Rails Tutorial has disappeared from RubyGems. When you try to bundle install, you get this error:
Could not find gem 'annotate-models (= 1.0.4)' in any of the gem sources listed in your Gemfile.
The solution is to use the annotate gem instead:
Gemfile
gem 'annotate', '2.4.0'
Then run
$ bundle install
as usual.
In order to reproduce the behavior of the annotate command provided by annotate-models, you should use bundle exec and pass the new annotate command the before option:
$ bundle exec annotate --position before
The Ruby on Rails Tutorial book has been updated accordingly.