3

我已加入annotate-models我的:development组,删除Gemfile.lock,运行bundle install,但仍然中断

$ annotate User
/usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `polyglot_original_require': no such file to load -- annotate/annotate_models (LoadError)
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/polyglot-0.3.1/lib/polyglot.rb:64:in `require'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/annotate-2.4.0/lib/tasks/annotate_models.rake:3
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/1.8/monitor.rb:242:in `synchronize'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/lib/ruby/gems/1.8/gems/annotate-2.4.0/bin/annotate:67
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/bin/annotate:19:in `load'
from /usr/local/Cellar/ruby-enterprise-edition/2010.02/bin/annotate:19

有任何想法吗?

4

2 回答 2

10

你是从命令提示符运行这个吗?如果是这样,请尝试bundle exec annotate User使用捆绑的 gem 而不是系统 gem。

宝石被称为“注释”还是“注释模型”?

于 2011-01-02T22:59:15.653 回答
1

不应该是annotate宝石吗?它的 github 存储库被称为annotate_models.

annotate-modelsgem 是不同的,并且有一段时间没有更新。

于 2011-01-02T22:57:04.730 回答