mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Expanded the requires again and included the load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
476f26ee90
commit
30f401114e
1 changed files with 21 additions and 2 deletions
|
@ -11,7 +11,21 @@ ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/components/[_a-z]*"])
|
||||||
|
|
||||||
# Followed by the standard includes.
|
# Followed by the standard includes.
|
||||||
ADDITIONAL_LOAD_PATHS.concat %w(
|
ADDITIONAL_LOAD_PATHS.concat %w(
|
||||||
app app/models app/controllers app/helpers app/apis config components lib vendor
|
app
|
||||||
|
app/models
|
||||||
|
app/controllers
|
||||||
|
app/helpers
|
||||||
|
app/apis
|
||||||
|
config
|
||||||
|
components
|
||||||
|
lib
|
||||||
|
vendor
|
||||||
|
vendor/rails/railties/lib
|
||||||
|
vendor/rails/actionpack/lib
|
||||||
|
vendor/rails/activesupport/lib
|
||||||
|
vendor/rails/activerecord/lib
|
||||||
|
vendor/rails/actionmailer/lib
|
||||||
|
vendor/rails/actionwebservice/lib
|
||||||
).map { |dir| "#{RAILS_ROOT}/#{dir}" }.select { |dir| File.directory?(dir) }
|
).map { |dir| "#{RAILS_ROOT}/#{dir}" }.select { |dir| File.directory?(dir) }
|
||||||
|
|
||||||
# Prepend to $LOAD_PATH
|
# Prepend to $LOAD_PATH
|
||||||
|
@ -31,7 +45,12 @@ if rails_files.all? { |f| File.file?(f) }
|
||||||
rails_files.each { |f| require f }
|
rails_files.each { |f| require f }
|
||||||
else
|
else
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
%w( activesupport activerecord actionpack actionmailer actionwebservice rails ).each { |gem| require_gem(gem) }
|
require_gem 'activesupport'
|
||||||
|
require_gem 'activerecord'
|
||||||
|
require_gem 'actionpack'
|
||||||
|
require_gem 'actionmailer'
|
||||||
|
require_gem 'actionwebservice'
|
||||||
|
require_gem 'rails'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Environment-specific configuration.
|
# Environment-specific configuration.
|
||||||
|
|
Loading…
Reference in a new issue