Project

General

Profile

Actions

Defect #13004

closed

Bundle may fail because of the way config/database.yml is parsed

Added by Etienne Massip over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
High
Category:
Rails support
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

database.yml is loaded differently in Gemfile than Rails do (Rails ERB-parse the file before YAML-parsing it).

Because of that, application won't start anymore with database.yml files which Rails succeed to load otherwise.

The Rails way:

require 'erb'
YAML::load(ERB.new(IO.read(paths["config/database"].first)).result)

Actions

Also available in: Atom PDF