Как заставить Annotate gem работать? - PullRequest
3 голосов
/ 03 января 2011

Я включил 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

Есть идеи?

Ответы [ 2 ]

10 голосов
/ 03 января 2011

Запускаете ли вы это из командной строки? Если это так, попробуйте bundle exec annotate User использовать ваши драгоценные камни, а не системные.

И называется ли камень "аннотировать" или "аннотировать-модели"?

1 голос
/ 03 января 2011

Разве это не должно быть annotate драгоценный камень? Репозиторий Github называется annotate_models.

annotate-models самоцвет отличается и некоторое время не обновлялся.

...