Skip to content

Commit 431140c

Browse files
committed
safer check for RAILS_ENV, #177
1 parent caf1c68 commit 431140c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/jammit.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def self.load_configuration(config_path, soft=false)
6868
conf = YAML.load(ERB.new(File.read(config_path)).result)
6969

7070
# Optionally overwrite configuration based on the environment.
71-
rails_env = defined?(Rails) ? Rails.env : RAILS_ENV
71+
rails_env = defined?(Rails) ? Rails.env : ENV['RAILS_ENV']
7272
conf.merge! conf.delete rails_env if conf.has_key? rails_env
7373

7474
@config_path = config_path

0 commit comments

Comments
 (0)