开发者

How to get Annotate gem to work?

开发者 https://www.devze.com 2023-02-02 17:54 出处:网络
I\'ve included annotate-models in my :development group, removed Gemfile.lock, ran bundle install, and still it breaks.

I've included annotate-models in my :development group, removed Gemfile.lock, ran bundle install, and still it breaks.

$ 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-editi开发者_如何学编程on/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

Any ideas?


Are you running this from the command prompt? If so try bundle exec annotate User to use your bundled gems rather than the system gems.

And is the gem called 'annotate' or 'annotate-models'?


Shouldn't it be annotate gem? Its github repo is called annotate_models.

annotate-models gem is different and hasn't been updated for a while.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号