diff options
-rw-r--r-- | Gemfile | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -48,7 +48,8 @@ require 'erb' require 'yaml' database_file = File.join(File.dirname(__FILE__), "config/database.yml") if File.exist?(database_file) - database_config = YAML::load(ERB.new(IO.read(database_file)).result) + yaml_config = ERB.new(IO.read(database_file)).result + database_config = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(yaml_config) : YAML.load(yaml_config) adapters = database_config.values.map {|c| c['adapter']}.compact.uniq if adapters.any? adapters.each do |adapter| |