diff options
author | francis <francis> | 2008-09-04 08:21:38 +0000 |
---|---|---|
committer | francis <francis> | 2008-09-04 08:21:38 +0000 |
commit | 42a33a9947e3db4398bfe5cf79b04822d4886857 (patch) | |
tree | 6c26746046a9b6a94b6f2497d6b632a7ae266204 | |
parent | f04827b1e88899d270cee7786882274f336ca382 (diff) |
My hacky system for having a default environment
-rw-r--r-- | config/boot.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/boot.rb b/config/boot.rb index cd21fb9ea..30e4851a5 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,6 +1,16 @@ # Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb +# Hmmm, that's a bit daft - 'production' needs setting not only in the web +# server, it also needs setting in all the scripts, so a central place seems +# better. Look for a config/rails_env file, and read stuff from there if +# it exists. Put just a line like this in there: +# ENV['RAILS_ENV'] = 'production' +rails_env_file = File.join(File.dirname(__FILE__), 'rails_env.rb') +if File.exists?(rails_env_file) + require rails_env_file +end + RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails |