Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/jammit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ def self.load_configuration(config_path, soft=false)
exists = config_path && File.exists?(config_path)
return false if soft && !exists
raise MissingConfiguration, "could not find the \"#{config_path}\" configuration file" unless exists
conf = YAML.load(ERB.new(File.read(config_path)).result)
erb = ERB.new(File.read(config_path))
erb.filename = config_path
conf = YAML.load(erb.result)

# Optionally overwrite configuration based on the environment.
rails_env = (defined?(Rails) ? ::Rails.env : ENV['RAILS_ENV'] || "development")
Expand Down