Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

boot.rb required twice

#5697

When you run

script/rails server

from the Rails.root directory, it will first

  require File.expand_path('../../config/boot',  FILE)
and then, via rails/commands.rb
  require APP_PATH
which is always config/application.rb, which first does
  require File.expand_path('../boot', FILE)
and as such, config/boot will be required twice. It doesn't do any harm, but it is slightly confusing and that could lead to a problem in the future. Removing the require boot.rb from application.rb seems the best way to go?

Reported by Ivo Wever · September 24th, 2010 @ 09:54 AM

State: invalid
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. José Valim
    José Valim
    • State changed from new to invalid
    • Importance changed from to Low

    Since both are expanding the path, it is ok. Ruby won't load the same file twice. We cannot remove the one in applicatoin.rb because you can start your rails app through other means besides script/rails.

    September 24th, 2010 @ 11:23 AM