2
루비 레일 : 2.3.0p0주석 보석 구성주고 오류를
레일 버전 : 4.2.6
주석 보석 버전 :
:rails g annotate:install
일에 2.7.1
날이 오류를 제공합니다
(erb):34:in `template': uninitialized constant AnnotateModels (NameError)
from /Users/newput/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/erb.rb:864:in `eval'
from /Users/newput/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/erb.rb:864:in `result'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block (2 levels) in invoke!'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `open'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:62:in `block in invoke!'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/empty_directory.rb:116:in `invoke_with_conflict_check'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:60:in `invoke!'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:94:in `action'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/create_file.rb:25:in `create_file'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:115:in `template'
from /Users/newput/.rvm/gems/ruby-2.3.0/gems/annotate-2.7.1/lib/generators/annotate/install_generator.rb:9:in `copy_tasks'
나를 위해 일하지 않아! – shashank
흠. Gemfile에 어떤 그룹 아래에'gem 'annotate'을 두었습니까? 그룹과 RAILS_ENV가 일치하지 않으면 보석이로드되지 않고 동일한 오류가 발생합니다. – hibariya
감사합니다.'annotate'를 개발 번들로 옮깁니다. – shashank