My gem file looks like:
group :development, :test do
gem 'rspec-rails'
gem 'annotate-models', '1.0.4'
end
I ran 'bundle install
' and it installed the annotate-models bundle.
If I type: annotate
I get a command not found error.
If I type: bundle show annotate
I get a 'could not find gem annotate in the current bundle.
If I type bundle show annotate-models it says it installed in:
/Library/Ruby/Gems/1.8/gems/annotate-models-1.0.4
typing:
annotate-models
doesn't work either.
I'm following along in railstutorial.org and got stuck at this point.
Edit: Better version (using Bundler to install it only for the current project)
gem 'annotate'
to Gemfile$ bundle install
$ bundle exec annotate
Edit2: Seems you have to explicitly specify annotate version for now, so in Gemfile put gem 'annotate', '2.4.1.beta1'
(which is a prereleased beta gem that works with the latest version of activerecord as opposed to specifying the github repo directly)
Edit3: 2.5.0 final is out now, so hopefully no need to force a beta version any more, just getting the latest should work!
Old version (with installing the gem on a system level too):
If running Rails 3 the drill is:
$ sudo gem install annotate
gem 'annotate'
to Gemfile$ bundle install
$ annotate
You should run the command inside your bundled environment with:
$ bundle exec annotate
Check out the man page for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With