#16 ✓resolved
Xavier Noria

more emphasis on boot.rb?

Reported by Xavier Noria | December 20th, 2007 @ 08:11 AM | in The Rails 3 Way

This is just a remark. It turns out that script/server, script/runner, and script/console load first boot.rb, and then environment.rb.

I think there's redundancy there and they could just load environment.rb directly, but that's the way they are written. Since boot.rb does nothing if it was already run, the load in environment.rb of boot.rb just returns, and then the initializer block computes load_paths again.

So if you launch the server and Rails is not under vendor the gem version, if any, is extracted with a regexp because environment.rb has not yet been loaded.

The regexp is much robust in 2.0 than in previous versions, it allows some optional whitespace, single and double quotes, and gems version operators.

boot.rb has been vastly cleaned as well, it was a script before, and now it is very structured and clear.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

Shared Ticket Bins

People watching this ticket


Referenced by