machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

undefined method `register_engine' for nil:NilClass #262

Closed belgoros closed 8 years ago

belgoros commented 8 years ago

When running:

rails generate ember:install --javascript-engine coffee

I get the following error:

$ rails generate ember:install --javascript-engine coffee
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/emblem-rails-0.2.2/lib/emblem/rails/engine.rb:7:in `block in <class:Engine>': undefined method `register_engine' for nil:NilClass (NoMethodError)
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:420:in `block (2 levels) in each_strongly_connected_component_from'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:419:in `block in each_strongly_connected_component_from'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:44:in `each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:44:in `tsort_each_child'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:413:in `call'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:413:in `each_strongly_connected_component_from'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `each'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `call'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
        from C:/Ruby22-x64/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
        from D:/projects/ember-crm/config/environment.rb:5:in `<top (required)>'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:328:in `require_environment!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:142:in `require_application_and_environment!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:128:in `generate_or_destroy'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:50:in `generate'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'

Reproduced on:

thec0keman commented 8 years ago

@Javix I believe this is more properly an emblem-rails related issue as emblem is entirely agnostic of ruby / rails.