comparison config/application.rb @ 355:56382cb104dd

Add support for environment variable-based deployment.
author edogawaconan <me@myconan.net>
date Mon, 04 Aug 2014 17:05:16 +0900
parents 7c7b7906ebd9
children 7b58d38c9b6a
comparison
equal deleted inserted replaced
354:5ac923264129 355:56382cb104dd
1 require File.expand_path("../boot", __FILE__) 1 require File.expand_path("../boot", __FILE__)
2
3 # To allow setting environment variable ZP_DATABASE_URL instead of DATABASE_URL.
4 ENV["DATABASE_URL"] = ENV["ZP_DATABASE_URL"] if ENV["ZP_DATABASE_URL"]
2 5
3 require "active_record/railtie" 6 require "active_record/railtie"
4 require "action_controller/railtie" 7 require "action_controller/railtie"
5 # require "action_mailer/railtie" 8 # require "action_mailer/railtie"
6 # require "active_resource/railtie" 9 # require "active_resource/railtie"
7 require "sprockets/railtie" 10 require "sprockets/railtie"
8 require "rails/test_unit/railtie" 11 require "rails/test_unit/railtie"
9 12
10 require File.expand_path("../init_config", __FILE__) 13 require File.expand_path("../init_config", __FILE__)
11 require File.expand_path("../local_config", __FILE__) 14 suppress(LoadError) { require File.expand_path("../local_config", __FILE__) }
12 require File.expand_path("../default_config", __FILE__) 15 require File.expand_path("../default_config", __FILE__)
13 16
14 # Pick the frameworks you want: 17 # Pick the frameworks you want:
15 if defined?(Bundler) 18 if defined?(Bundler)
16 # If you precompile assets before deploying to production, use this line 19 # If you precompile assets before deploying to production, use this line