osem-fcy/config/environment.rb

16 lines
428 B
Ruby
Raw Normal View History

2013-01-07 09:04:09 +01:00
# Load the rails application
require File.expand_path('../application', __FILE__)
2014-04-23 15:45:55 +02:00
# Load the configuration file
path = Rails.root.join("config", "config.yml")
begin
CONFIG = YAML.load_file(path)[Rails.env]
rescue Exception
puts "Error while parsing config file #{path}"
CONFIG = Hash.new
end
2013-01-07 09:04:09 +01:00
# Initialize the rails application
Osem::Application.initialize!
2014-04-23 15:45:55 +02:00
Osem::Application.config.secret_keybase = CONFIG['secret_key']