Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Run set load path so others can do boot and get path

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2429 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 11de94748e1543065748637b083984a69350b1a6 1 parent 241b842
@dhh dhh authored
Showing with 7 additions and 6 deletions.
  1. +7 −5 railties/environments/boot.rb
  2. +0 −1  railties/fresh_rakefile
View
12 railties/environments/boot.rb
@@ -1,8 +1,10 @@
-RAILS_ROOT = File.join(File.dirname(__FILE__), '..')
+RAILS_ROOT = File.join(File.dirname(__FILE__), '..') unless defined?(RAILS_ROOT)
-unless File.directory?("#{RAILS_ROOT}/vendor/rails")
+if File.directory?("#{RAILS_ROOT}/vendor/rails")
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
+else
require 'rubygems'
require 'initializer'
-else
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
-end
+end
+
+Rails::Initializer.run(:set_load_path)
View
1  railties/fresh_rakefile
@@ -2,7 +2,6 @@
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
-Rails::Initializer.run(:set_load_path)
require 'rake'
require 'rake/testtask'
Please sign in to comment.
Something went wrong with that request. Please try again.