当我运行Annotate Model Gem的命令来注释我的模型时,我收到以下错误,我使用这两种方法来安装 gem:
$ annotate --exclude tests, fixtures
c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':
from c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/annotate-2.5.0/bin/annotate:3:i
from c:/Ruby192/bin/annotate:19:in `load'
from c:/Ruby192/bin/annotate:19:in `<main>'
$ bundle exec annotate --exclude tests, fixtures
c:/Ruby192/lib/ruby/gems/1.9.1/gems/annotate-2.5.0/bin/annotate:3:in `require': no such file to load -- rake/dsl_definition (LoadError)
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/annotate-2.5.0/bin/annotate:3:in `<top (required)>'
from c:/Ruby192/lib/ruby/gems/1.9.1/bin/annotate:19:in `load'
from c:/Ruby192/lib/ruby/gems/1.9.1/bin/annotate:19:in `<main>'
宝石文件
gem "rails", "3.1.0"
gem "rake", "0.8.7"
group :development do
gem "annotate", "2.5.0"
end
命令行:
$ gem install annotate
Successfully installed annotate-2.5.0
1 gem installed
我怎样才能让这个宝石工作?