Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails ember-rails:未定义的方法'ember';对于#<;Rails::应用程序::配置:0x007f14d10deb88>;(命名者)_Ruby On Rails_Ember.js_Ruby On Rails 4 - Fatal编程技术网

Ruby on rails ember-rails:未定义的方法'ember';对于#<;Rails::应用程序::配置:0x007f14d10deb88>;(命名者)

Ruby on rails ember-rails:未定义的方法'ember';对于#<;Rails::应用程序::配置:0x007f14d10deb88>;(命名者),ruby-on-rails,ember.js,ruby-on-rails-4,Ruby On Rails,Ember.js,Ruby On Rails 4,我一直在ember-railsgem中遇到这个错误: 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

我一直在
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'(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'
/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`'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active\u-support/dependencies.rb:228:in'require'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active\u-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\u support/dependencies.rb:213:in'load\u dependencity'
/home/deploy/apps/gastos/shared/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active\u-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层)in'
/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'
/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:“运行中的块初始化器”
/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:在每个强连接的组件中的“块(2个级别)”中
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:210:在每个强连接的组件中的“块(2级)”中
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:在“每个强连接的组件”中
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:209:在“每个强连接的组件中的块”中
/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:在“每个强连接的组件”中
/home/deploy/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:在“每个强连接的\u组件中的块”中
/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:“每个强连接的组件”
/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`'
我在我的环境文件(
staging.rb
)中放置了ember的配置,如下所示:

config.ember.variant=:生产

到目前为止,我从谷歌得到的唯一线索是,解决方案是从
:assets
组中删除
ember-rails
。我已经在使用Rails 4了,所以我甚至没有一个
:assets
组。我还应该指出,我已经将我的应用程序设置为使用
staging
环境,因此我确信这个问题与其当前的Rails环境无关


还有其他人解决了这个问题吗?我是不是错过了什么?

为了其他可能遇到此错误的人,我所要做的就是重新启动服务器,然后服务器工作正常。

为了其他可能遇到此错误的人,我所要做的就是重新启动服务器,然后服务器工作正常。

目前也有同样的问题。你明白了吗?是的,结果我只是重新启动了服务器。如果这对你不起作用,我不知道还能做什么。为什么这从来不是我做的第一件事?!目前也有同样的问题。你明白了吗?是的,结果我只是重新启动了服务器。如果这对你不起作用,我不知道还能做什么。为什么这从来不是我做的第一件事?!