Defect #13004
closedBundle may fail because of the way config/database.yml is parsed
0%
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)
Updated by Etienne Massip almost 12 years ago
- Status changed from New to Confirmed
Updated by Etienne Massip almost 12 years ago
- Assignee deleted (
Jean-Philippe Lang)
Side note: I'm not convinced it's a good idea to put so much intelligence in this file but I don't really have a better idea.
Maybe something like a database_conf
Rails-environment dependent rake task which would initialize the database.yml
file with the right adapter and database configuration by interactively asking the user?
It would also bundle config without
the useless adapters.
Not really nice either, I know…
Updated by Jean-Philippe Lang almost 12 years ago
- Subject changed from Bundle fail because of the way config/database.yml is parsed to Bundle may fail because of the way config/database.yml is parsed
- Status changed from Confirmed to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Fixed in r11286.
Indeed, this solution is far from ideal but the problem with the --without
is that you'll install new adapters when they are added to Redmine's Gemfile. For example, you bundled Redmine with --without postgresql sqlite3
, and now that we have added sqlserver, you will install sqlserver gems when updating your bundle after an upgrade and most certainly get an error because freetds-dev is not installed.
Updated by Etienne Massip almost 12 years ago
- Target version deleted (
2.3.0)
Removed from Changelog since devel -> devel?