Skip to content

in `template': uninitialized constant AnnotateModels (NameError) #497

@actsasflinn

Description

@actsasflinn

Rails 5.1.2
Added to gem file from Rubygems or via Github

Annotation seems to work correctly but when adding the automated task there's an error...

monolith redacted$ rails g annotate:install
Running via Spring preloader in process 62567
create lib/tasks/auto_annotate_models.rake
(erb):37:in template': uninitialized constant AnnotateModels (NameError) from /Users/redacted/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/erb.rb:896:in eval'
from /Users/redacted/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/erb.rb:896:in result' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb:116:in block in template'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:53:in render' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:62:in block (2 levels) in invoke!'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:62:in open' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:62:in block in invoke!'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/empty_directory.rb:116:in invoke_with_conflict_check' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:60:in invoke!'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions.rb:95:in action' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/create_file.rb:25:in create_file'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/actions/file_manipulation.rb:115:in template' from /Users/redacted/.rvm/gems/ruby-2.4.0/bundler/gems/annotate_models-5f37a974f3df/lib/generators/annotate/install_generator.rb:9:in copy_tasks'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in run' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in block in invoke_all' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in each'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in map' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:133:in invoke_all'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/group.rb:232:in dispatch' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/base.rb:444:in start'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/railties-5.1.2/lib/rails/generators.rb:269:in invoke' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/railties-5.1.2/lib/rails/commands/generate/generate_command.rb:24:in perform'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/command.rb:27:in run' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/thor-0.19.4/lib/thor.rb:369:in dispatch' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/railties-5.1.2/lib/rails/command/base.rb:63:in perform'
from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/railties-5.1.2/lib/rails/command.rb:44:in invoke' from /Users/redacted/.rvm/gems/ruby-2.4.0/gems/railties-5.1.2/lib/rails/commands.rb:16:in <top (required)>'
from /Users/redacted/Projects/redacted/monolith/bin/rails:9:in <top (required)>' from /Users/redacted/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'
from /Users/redacted/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require' from -e:1:in

'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions