Project

General

Profile

Bug #20920

Rails 5 causes error when server is trying to start

Added by Ori Rabin about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

This is the stacktrace I get when trying to start the server (no plugins are enabled):

 /home/foreman/lib/foreman.rb:16:in `in_rake?': undefined method `application' for Rake:Module (NoMethodError)
    from /home/foreman/lib/core_extensions.rb:120:in `per_page'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/will_paginate-3.1.6/lib/will_paginate/per_page.rb:18:in `inherited'
    from /home/foreman/app/models/operatingsystem.rb:4:in `<top (required)>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:477:in `load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:477:in `block in load_file'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:662:in `new_constants_in'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:476:in `load_file'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:375:in `block in require_or_load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:37:in `block in load_interlock'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/concurrency/share_lock.rb:150:in `exclusive'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies/interlock.rb:11:in `loading'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:37:in `load_interlock'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:358:in `require_or_load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:511:in `load_missing_constant'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:203:in `const_missing'
    from /home/foreman/config/initializers/apipie.rb:19:in `block in <top (required)>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/apipie-rails-0.5.4/lib/apipie/apipie_module.rb:22:in `configure'
    from /home/foreman/config/initializers/apipie.rb:3:in `<top (required)>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:287:in `load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:287:in `block in load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:287:in `load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/engine.rb:648:in `block in load_config_initializer'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/notifications.rb:166:in `instrument'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/engine.rb:647:in `load_config_initializer'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/engine.rb:611:in `each'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/engine.rb:611:in `block in <class:Engine>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/initializable.rb:30:in `instance_exec'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/initializable.rb:30:in `run'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/initializable.rb:44:in `each'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/initializable.rb:44:in `tsort_each_child'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:415:in `call'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `call'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
    from /home/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/initializable.rb:54:in `run_initializers'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/application.rb:352:in `initialize!'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/railtie.rb:193:in `public_send'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/railtie.rb:193:in `method_missing'
    from /home/foreman/config/environment.rb:5:in `<top (required)>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `block in require'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:259:in `load_dependency'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/activesupport-5.0.6/lib/active_support/dependencies.rb:293:in `require'
    from /home/foreman/config.ru:3:in `block in <main>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
    from /home/foreman/config.ru:in `new'
    from /home/foreman/config.ru:in `<main>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/builder.rb:49:in `eval'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/builder.rb:49:in `new_from_string'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/builder.rb:40:in `parse_file'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/server.rb:319:in `build_app_and_options_from_config'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/server.rb:219:in `app'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/server.rb:84:in `app'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/rack-2.0.3/lib/rack/server.rb:354:in `wrapped_app'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/server.rb:148:in `log_to_stdout'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/server.rb:102:in `start'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:90:in `block in server'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `tap'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:85:in `server'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/railties-5.0.6/lib/rails/commands.rb:18:in `<top (required)>'
    from /home/foreman/bin/rails:9:in `require'
    from /home/foreman/bin/rails:9:in `<top (required)>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/lib/spring/client/rails.rb:28:in `call'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/lib/spring/client/command.rb:7:in `call'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/lib/spring/client.rb:30:in `run'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/bin/spring:49:in `<top (required)>'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `load'
    from /home/.rvm/gems/ruby-2.3.3@foreman/gems/spring-2.0.2/lib/spring/binstub.rb:31:in `<top (required)>'
    from /home/foreman/bin/spring:13:in `require'
    from /home/foreman/bin/spring:13:in `<top (required)>'
    from bin/rails:3:in `load'
    from bin/rails:3:in `<main>'

Related issues

Blocks Foreman - Tracker #15715: Rails 5.0 upgrade tasksResolved2016-07-18

Associated revisions

Revision 642d111c (diff)
Added by Tomer Brisker about 3 years ago

Fixes #20920 - Prevent boot issue with Rake.application

History

#1 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomer Brisker
  • Pull request https://github.com/theforeman/foreman/pull/4830 added

#2 Updated by Tomer Brisker about 3 years ago

#3 Updated by Ivan Necas about 3 years ago

  • Status changed from Ready For Testing to Closed
  • Legacy Backlogs Release (now unused) set to 296

Also available in: Atom PDF