Project

General

Profile

Actions

Bug #13878

closed

assets_paths initializer fails calling generate_railtie_name on Rails 4.2

Added by Dominic Cleal over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

On Rails 4.2, a railtie is getting added that has no name. This causes our initialiser that checks for deprecated engine initialisers to fail on Rails startup with the following error:

/home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.2.5.1/lib/rails/railtie.rb:187:in `generate_railtie_name': undefined method `tr' for nil:NilClass (NoMethodError)
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.2.5.1/lib/rails/railtie.rb:165:in `railtie_name'
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.2.5.1/lib/rails/railtie.rb:201:in `railtie_name'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets_paths.rb:9:in `block in <top (required)>'
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.2.5.1/lib/rails/engine/railties.rb:13:in `each'
        from /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/railties-4.2.5.1/lib/rails/engine/railties.rb:13:in `each'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets_paths.rb:9:in `select'
        from /home/dcleal/code/foreman/foreman/config/initializers/assets_paths.rb:9:in `<top (required)>'

Debug shows:

> Rails.application.railties.find { |e| e.class.name.nil? }.inspect
#<#<Class:0x00000002f84f88>:0x00000005c678e8 @initializers=[]>

Handling of this can be backported safely to develop.


Related issues 1 (0 open1 closed)

Blocks Foreman - Feature #13244: Upgrade Ruby on Rails to 4.2ClosedDominic Cleal01/15/2016Actions
Actions #1

Updated by Dominic Cleal over 8 years ago

Actions #2

Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3231 added
Actions #3

Updated by Dominic Cleal over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Dominic Cleal over 8 years ago

  • Translation missing: en.field_release set to 136
Actions

Also available in: Atom PDF