mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
c10a2d2475
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4109 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
24 lines
839 B
Ruby
24 lines
839 B
Ruby
# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
|
|
|
|
unless defined?(RAILS_ROOT)
|
|
root_path = File.join(File.dirname(__FILE__), '..')
|
|
unless RUBY_PLATFORM =~ /mswin32/
|
|
require 'pathname'
|
|
root_path = Pathname.new(root_path).cleanpath(true).to_s
|
|
end
|
|
RAILS_ROOT = root_path
|
|
end
|
|
|
|
if File.directory?("#{RAILS_ROOT}/vendor/rails")
|
|
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
|
else
|
|
require 'rubygems'
|
|
required_version = '<%= Rails::VERSION::STRING %>'
|
|
rails_gem = Gem.cache.search('rails', "=#{required_version}").first
|
|
unless rails_gem
|
|
STDERR.puts "Cannot find gem for Rails =#{required_version}. Install missing gem or change config/boot.rb."
|
|
end
|
|
require rails_gem.full_gem_path + '/lib/initializer'
|
|
end
|
|
|
|
Rails::Initializer.run(:set_load_path)
|