1
0
Fork 0
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:
David Heinemeier Hansson 2005-02-17 19:04:47 +00:00
parent 02e382a765
commit 0aad5abcc8
4 changed files with 19 additions and 8 deletions

View file

@ -24,9 +24,12 @@
begin begin
require 'action_controller' require 'action_controller'
rescue LoadError rescue LoadError
# Action Pack is not already available, try RubyGems begin
require 'rubygems' require File.dirname(__FILE__) + '/../../actionpack/lib/action_controller'
require_gem 'actionpack', '>= 0.9.0' rescue LoadError
require 'rubygems'
require_gem 'actionpack', '>= 0.9.0'
end
end end
$:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/") $:.unshift(File.dirname(__FILE__) + "/action_mailer/vendor/")

View file

@ -26,8 +26,12 @@ $:.unshift(File.dirname(__FILE__))
begin begin
require 'active_support' require 'active_support'
rescue LoadError rescue LoadError
require 'rubygems' begin
require_gem 'activesupport' require File.dirname(__FILE__) + '/../../activesupport/lib/active_support'
rescue LoadError
require 'rubygems'
require_gem 'activesupport'
end
end end
require 'action_controller/base' require 'action_controller/base'

View file

@ -22,7 +22,7 @@
#++ #++
begin begin
require 'rubygems' require 'rubygems'
require 'builder' require 'builder'
rescue LoadError rescue LoadError
# RubyGems is not available, use included Builder # RubyGems is not available, use included Builder

View file

@ -27,8 +27,12 @@ $:.unshift(File.dirname(__FILE__))
begin begin
require 'active_support' require 'active_support'
rescue LoadError rescue LoadError
require 'rubygems' begin
require_gem 'activesupport' require File.dirname(__FILE__) + '/../../activesupport/lib/active_support'
rescue LoadError
require 'rubygems'
require_gem 'activesupport'
end
end end
require 'active_record/base' require 'active_record/base'