Skip to content

Commit 02eacb4

Browse files
committed
pass database.yml thru ERB parser first
1 parent 33b9b15 commit 02eacb4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/unicorn.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
after_fork do |server, worker|
1919
if defined?(ActiveRecord::Base)
2020
env = ENV['RACK_ENV'] || "development"
21-
config = YAML::load(File.open('config/database.yml'))[env]
21+
config = YAML::load(ERB.new(File.read('config/database.yml')).result)[env]
2222
ActiveRecord::Base.establish_connection(config)
2323
end
2424
end

0 commit comments

Comments
 (0)