Sha256: 3ffd8f82f72d2b66905603d43e1ecc0e97ad3e7bb55fad00f0e5696f63dfdcbe
Contents?: true
Size: 1.09 KB
Versions: 2
Compression:
Stored size: 1.09 KB
Contents
# Be sure to restart your server when you modify this file. rails_env = ENV['RAILS_ENV'] || 'development' env_dir = File.join(RAILS_ROOT, 'config', rails_env) db_file = File.join(env_dir, 'database.yml') env_file = File.join(env_dir, 'environment.rb') unless File.exists?(env_dir) puts "#{env_dir} environment directory cannot be found." exit(1) end unless File.exists?(db_file) puts "#{db_file} is missing. You cannot continue without this." exit(1) # exit with an error code end unless File.exists?(env_file) puts "#{env_file} environment file is missing." exit(1) end # Now, let's open up Rails and tell it to find our environment files elsewhere. module Rails class Configuration def database_configuration_file File.join(root_path, 'config', environment, 'database.yml') end # The path to the current environment's file (development.rb, etc.). By # default the file is at <tt>config/environments/#{environment}.rb</tt>. def environment_path "#{root_path}/config/#{environment}/environment.rb" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
environmentalist-0.2.1 | test/rails210test/config/postboot.rb |
environmentalist-0.1.0 | lib/conf/postboot.rb |