1

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

到目前为止,我从谷歌得到的唯一线索是Github 上的这个问题,ember-rails解决方案是从:assets小组中取出。我已经在使用 Rails 4,所以我什至没有一个:assets组。我还应该指出,我已经将我的应用程序设置为使用staging环境,所以我确定问题与其当前的 Rails 环境没有任何关系。

有没有其他人已经解决了这个问题?我只是错过了什么吗?

4

1 回答 1

1

为了其他可能遇到此错误的人,我所要做的就是重新启动我的服务器,之后它运行良好。

于 2014-02-08T01:53:38.930 回答