Project

General

Profile

Actions

Defect #13004

closed

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

Added by Etienne Massip almost 12 years ago. Updated almost 12 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