Model annotation

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.

About

This is the news feed for Ruby on Rails Tutorial by Michael Hartl, the best place to learn Rails. Visit the main website for more information about the project. You should subscribe to the news feed and follow Rails Tutorial on Twitter for all the latest updates.

Subscribe via RSS »