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