This project is archived and is in readonly mode.

#5697 ✓invalid
Ivo Wever

boot.rb required twice

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

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?

Comments and changes to this ticket

  • José Valim

    José Valim September 24th, 2010 @ 11:23 AM

    • 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.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages