undefined method `register_engine' for nil:NilClass #170

Closed
kristianmandrup opened this Issue Apr 1, 2013 · 4 comments

Projects

None yet

3 participants

@kristianmandrup
/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?

@stefanpenner
Member

is this still an issue?

@bodokaiser

@stefanpenner had the same problem adding

require "sprockets/railtie"

to config/application.rb solves the issue

@stefanpenner
Member

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

@bodokaiser

The current gem release. Version of Rails is

gem 'rails', '3.2.13'

This happens always when you manually have to remove ActiveRecord to use a NoSQL database (else there is require('rails') I think).

I guess a note on the installation for NoSQL users would be enough.

Bodo

Am 23.06.2013 um 18:24 schrieb Stefan Penner notifications@github.com:

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


Reply to this email directly or view it on GitHub.

@rwjblue rwjblue added a commit to rwjblue/ember-rails that referenced this issue Oct 31, 2013
@rwjblue rwjblue Require `Sprockets` from Ember::Rails::Engine.
Resolves emberjs#170.
a5dda1e
@rwjblue rwjblue closed this in #293 Oct 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment