2005-10-15 18:55:52 -04:00
|
|
|
unless defined?(RAILS_ROOT)
|
2005-10-19 09:47:45 -04:00
|
|
|
root_path = File.join(File.dirname(__FILE__), '..')
|
|
|
|
unless RUBY_PLATFORM =~ /mswin32/
|
|
|
|
require 'pathname'
|
2005-10-27 13:00:25 -04:00
|
|
|
root_path = Pathname.new(root_path).cleanpath(true).to_s
|
2005-10-19 09:47:45 -04:00
|
|
|
end
|
|
|
|
RAILS_ROOT = root_path
|
2005-10-15 18:55:52 -04:00
|
|
|
end
|
2005-09-03 11:13:06 -04:00
|
|
|
|
2005-09-30 11:13:44 -04:00
|
|
|
if File.directory?("#{RAILS_ROOT}/vendor/rails")
|
|
|
|
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
|
|
|
|
else
|
2005-09-03 11:13:06 -04:00
|
|
|
require 'rubygems'
|
|
|
|
require 'initializer'
|
2005-09-30 11:13:44 -04:00
|
|
|
end
|
|
|
|
|
2005-10-27 13:00:25 -04:00
|
|
|
Rails::Initializer.run(:set_load_path)
|