guard-annotate icon indicating copy to clipboard operation
guard-annotate copied to clipboard

problem with running annotate

Open alec-c4 opened this issue 11 years ago • 4 comments

Hi, i'm expecting something strange in guard logs:

14:11:32 - INFO - Running annotate
/Users/alec/.rvm/gems/ruby-2.0.0-p247@m_social/gems/annotate-2.6.1/bin/annotate:143:in `<top (required)>': invalid argument: --exclude tests,fixtures (OptionParser::InvalidArgument)
    from /Users/alec/.rvm/gems/ruby-2.0.0-p247@ m_social/bin/annotate:23:in `load'
    from /Users/alec/.rvm/gems/ruby-2.0.0-p247@ m_social/bin/annotate:23:in `<main>'
    from /Users/alec/.rvm/gems/ruby-2.0.0-p247@ m_social/bin/ruby_executable_hooks:15:in `eval'
    from /Users/alec/.rvm/gems/ruby-2.0.0-p247@ m_social/bin/ruby_executable_hooks:15:in `<main>'

but my guard file config is default:

guard 'annotate' do
  watch( 'db/schema.rb' )

  # Uncomment the following line if you also want to run annotate anytime
  # a model file changes
  #watch( 'app/models/**/*.rb' )

  # Uncomment the following line if you are running routes annotation
  # with the ":routes => true" option
  #watch( 'config/routes.rb' )
end

how to fix it?

alec-c4 avatar Dec 26 '13 10:12 alec-c4

Maybe the annotate gem changed its available arguments. guard-annotate was last tested with the 2.4.x branch of annotate, and it looks like you are on 2.6.1. Could you checkout the annotate changelog and submit a PR with updates?

cpjolicoeur avatar Dec 26 '13 23:12 cpjolicoeur

I'm having the same problems. And according to the README, the options still exist:

To annotate just your models: annotate --exclude tests,fixtures,factories.

jmuheim avatar Jan 01 '14 21:01 jmuheim

Any new info on this?

jmuheim avatar Mar 01 '14 13:03 jmuheim

I updated guard-rails and now it seems to work. Thanks! :+1:

jmuheim avatar Mar 01 '14 14:03 jmuheim