Due to the content- (rather than directory- or file-) oriented nature of Git, if a user attempts to remove vendor/rails from his repository using
git rm -r vendor/rails
Git will remove all of the associated files, but leave leave a barren ghost-town of empty Rails directories intact, which may not be immediately apparent to the new Git user. This confuses boot.rb, which assumes (quite wrongly) that just because the vendor/rails directory is present, that Rails itself is present. This leads to the slightly cryptic error:
(in /Users/ryan/Sites/blah)
rake aborted!
no such file to load -- /Users/ryan/Sites/blah/config/../vendor/rails/railties/lib/initializer
/Users/ryan/Sites/blah/rakefile:4
(See full trace by running task with --trace)
whenever one attempts to run Rails or any of its rake tasks.
I have attached a patch that makes boot.rb check that initializer.rb actually exists (rather than just vendor/rails) before proceeding to try to load Rails. Now if vendor/rails exists but not the initializer, boot.rb will revert to loading the gem version of Rails (a contingency which is also tested.)
No doc updates necessary. Associated tests updated, pass.