我一直在使用ember-rails
gem:
ERROR -- : undefined method `ember' for #<Rails::Application::Configuration:0x007f14d10deb88> (NoMethodError)
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configuration.rb:95:in `method_missing'
/home/deploy/apps/gastos/releases/20130914034514/config/environments/staging.rb:81:in `block in <top (required)>'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:24:in `class_eval'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:24:in `configure'
/home/deploy/apps/gastos/releases/20130914034514/config/environments/staging.rb:1:in `<top (required)>'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:590:in `each'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:590:in `block in <class:Engine>'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `each'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `tsort_each_child'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/deploy/apps/gastos/releases/20130914034514/config/environment.rb:5:in `<top (required)>'
我已将ember的配置放在我的环境文件(staging.rb
)中,如下所示:
config.ember.variant = :production
到目前为止,我从Google获得的唯一线索是this issue on Github,解决方案是从ember-rails
组中取出:assets
。我已经使用了Rails 4,所以我首先没有:assets
组。我还应该指出,我已经设置了我的应用程序以使用staging
环境,因此我确信该问题与其当前的Rails环境没有任何关系。
还有其他人已经解决了这个问题吗?我只是错过了一些东西吗?
答案 0 :(得分:1)
为了其他可能遇到此错误的人,我所要做的就是重新启动我的服务器,之后它运行良好。