also check file for existance

bug/bundler_fix
Christian Mehlmauer 2016-01-19 23:55:49 +01:00
parent f68b2b56fa
commit 390b46dd25
No known key found for this signature in database
GPG Key ID: DCF54A05D6E62591
1 changed files with 2 additions and 1 deletions

View File

@ -49,7 +49,8 @@ module Metasploit
#
# @return [void]
def self.optionally_active_record_railtie
if ::Rails.application.config.paths['config/database'].any?
conf = ::Rails.application.config.paths['config/database']
if conf.any? && ::File.exist?(conf.first)
optionally(
'active_record/railtie',
'activerecord not in the bundle, so database support will be disabled.'