mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
AR, AP, and AM should look for AS in sibling directory before trying RubyGems #648
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@648 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
02e382a765
commit
0aad5abcc8
4 changed files with 19 additions and 8 deletions
|
@ -24,10 +24,13 @@
|
||||||
begin
|
begin
|
||||||
require 'action_controller'
|
require 'action_controller'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
# Action Pack is not already available, try RubyGems
|
begin
|
||||||
|
require File.dirname(__FILE__) + '/../../actionpack/lib/action_controller'
|
||||||
|
rescue LoadError
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require_gem 'actionpack', '>= 0.9.0'
|
require_gem 'actionpack', '>= 0.9.0'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
$:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/")
|
$:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/")
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,14 @@ $:.unshift(File.dirname(__FILE__))
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'active_support'
|
require 'active_support'
|
||||||
|
rescue LoadError
|
||||||
|
begin
|
||||||
|
require File.dirname(__FILE__) + '/../../activesupport/lib/active_support'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require_gem 'activesupport'
|
require_gem 'activesupport'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require 'action_controller/base'
|
require 'action_controller/base'
|
||||||
require 'action_controller/rescue'
|
require 'action_controller/rescue'
|
||||||
|
|
|
@ -26,10 +26,14 @@ $:.unshift(File.dirname(__FILE__))
|
||||||
|
|
||||||
begin
|
begin
|
||||||
require 'active_support'
|
require 'active_support'
|
||||||
|
rescue LoadError
|
||||||
|
begin
|
||||||
|
require File.dirname(__FILE__) + '/../../activesupport/lib/active_support'
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require_gem 'activesupport'
|
require_gem 'activesupport'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
require 'active_record/base'
|
require 'active_record/base'
|
||||||
require 'active_record/observer'
|
require 'active_record/observer'
|
||||||
|
|
Loading…
Reference in a new issue