From cf248eae1f32811400261e2e35d863cb1a549523 Mon Sep 17 00:00:00 2001 From: Nicholas Seckar Date: Sat, 25 Nov 2006 17:11:46 +0000 Subject: Update initializer to load Rails::VERSION as soon as possible. Closes #6698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/CHANGELOG | 2 ++ railties/lib/initializer.rb | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 02474a6508..2246ab9e6a 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Update initializer to load Rails::VERSION as soon as possible. Closes #6698. [Nicholas Seckar] + * Added ActiveRecord::Base.clear_active_connections! in development mode so the database connection is not carried over from request to request. Some databases won't reread the schema if that doesn't happen (I'm looking at you SQLite), so you have to restart the server after each migration (= no fun) [DHH] * Made RAILS_GEM_VERSION work for beta gems too, so specifying 1.1.6 will give you 1.1.6.4520 if available [DHH] diff --git a/railties/lib/initializer.rb b/railties/lib/initializer.rb index 17af5accda..908dde71c2 100644 --- a/railties/lib/initializer.rb +++ b/railties/lib/initializer.rb @@ -1,6 +1,7 @@ require 'logger' require 'set' require File.join(File.dirname(__FILE__), 'railties_path') +require File.join(File.dirname(__FILE__), 'rails/version') RAILS_ENV = (ENV['RAILS_ENV'] || 'development').dup unless defined?(RAILS_ENV) @@ -76,7 +77,6 @@ module Rails # Configuration instance. def process check_ruby_version - load_rails_version set_load_path set_connection_adapters @@ -121,11 +121,6 @@ module Rails require 'ruby_version_check' end - # Rails::VERSION should always be available. - def load_rails_version - require 'rails/version' - end - # Set the $LOAD_PATH based on the value of # Configuration#load_paths. Duplicates are removed. def set_load_path -- cgit v1.2.3