Skip to content
This repository

undefined method `register_engine' for nil:NilClass #170

Closed
kristianmandrup opened this Issue April 01, 2013 · 4 comments

3 participants

Kristian Mandrup Stefan Penner Bodo Kaiser
Kristian Mandrup
/Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/bundler/gems/ember-rails-4dc902b4e1c5/lib/ember/rails/engine.rb:20:in `block in <class:Engine>': undefined method `register_engine' for nil:NilClass (NoMethodError)
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /Users/kmandrup/private/repos/company/engines/ember-projects/ember-railsapi/config/environment.rb:5:in `<top (required)>'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
    from /Users/kmandrup/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
    from /Users/kmandrup/private/repos/company/engines/ember-projects/ember-railsapi/config.ru:3:in `block in <main>'

Any ideas why this would happen?

Stefan Penner
Owner

is this still an issue?

Bodo Kaiser

@stefanpenner had the same problem adding

require "sprockets/railtie"

to config/application.rb solves the issue

Stefan Penner
Owner

@bodokaiser is this on the current gem release or master. Can you confirm against master? Also which version of rails.

Bodo Kaiser
Robert Jackson rjackson referenced this issue from a commit in rjackson/ember-rails October 31, 2013
Robert Jackson Require `Sprockets` from Ember::Rails::Engine.
Resolves emberjs#170.
a5dda1e
Robert Jackson rjackson closed this in #293 October 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.