1 # Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
3 RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
5 unless defined?(Rails::Initializer)
6 if File.directory?("#{RAILS_ROOT}/vendor/rails")
7 require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
12 if defined? RAILS_GEM_VERSION
15 File.read("#{File.dirname(__FILE__)}/environment.rb") =~ /^[^#]*RAILS_GEM_VERSION\s+=\s+'([\d.]+)'/
20 rails_gem = Gem.cache.search('rails', "=#{rails_gem_version}.0").sort_by { |g| g.version.version }.last
23 gem "rails", "=#{rails_gem.version.version}"
24 require rails_gem.full_gem_path + '/lib/initializer'
26 STDERR.puts %(Cannot find gem for Rails =#{rails_gem_version}.0:
27 Install the missing gem with 'gem install -v=#{rails_gem_version} rails', or
28 change environment.rb to define RAILS_GEM_VERSION with your desired version.
38 Rails::Initializer.run(:set_load_path)