提交 9c52f96a 编写于 作者: J Jeremy Kemper

Include bundled env in toplevel require, if present

上级 df557814
......@@ -21,17 +21,19 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
$:.unshift(activesupport_path) if File.directory?(activesupport_path)
require 'active_support'
bundled = "#{File.dirname(__FILE__)}/../../vendor/gems/environment"
if File.exist?("#{bundled}.rb")
require bundled
else
activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
$:.unshift(activesupport_path) if File.directory?(activesupport_path)
begin
require 'active_model'
rescue LoadError
$:.unshift "#{File.dirname(__FILE__)}/../../activemodel/lib"
require 'active_model'
activemodel_path = "#{File.dirname(__FILE__)}/../../activemodel/lib"
$:.unshift(activemodel_path) if File.directory?(activemodel_path)
end
require 'active_support'
require 'active_model'
require 'arel'
module ActiveRecord
......
$:.unshift(File.dirname(__FILE__) + '/../../lib')
$:.unshift(File.dirname(__FILE__) + '/../../../activesupport/lib')
bundler = "#{File.dirname(__FILE__)}/../../vendor/gems/environment"
require bundler if File.exist?("#{bundler}.rb")
require 'config'
require 'rubygems'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册