Fix the Benchmark method issue by loading active_support which extends Benchmark

git-svn-id: file:///home/svn/framework3/trunk@6801 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-07-14 18:27:34 +00:00
parent 55356c88e1
commit 1ffa74cbb3
1 changed files with 8 additions and 2 deletions

View File

@ -36,17 +36,23 @@ class DBManager
@active = false
#
# Prefer our local copy of active_record
# Prefer our local copy of active_record and active_support
#
dir_ar = File.join(Msf::Config.data_directory, 'msfweb', 'vendor', 'rails', 'activerecord', 'lib')
if(File.directory?(dir_ar) and not $:.include?(dir_ar))
$:.unshift(dir_ar)
end
dir_as = File.join(Msf::Config.data_directory, 'msfweb', 'vendor', 'rails', 'activesupport', 'lib')
if(File.directory?(dir_as) and not $:.include?(dir_as))
$:.unshift(dir_as)
end
# Load ActiveRecord if it is available
begin
require 'rubygems'
require 'active_record'
require 'active_support'
require 'msf/core/db_objects'
@usable = true