diff options
-rw-r--r-- | config/.cvsignore | 1 | ||||
-rw-r--r-- | config/boot.rb | 12 | ||||
-rw-r--r-- | config/environment.rb | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/config/.cvsignore b/config/.cvsignore index 70812e24a..2539dd3cd 100644 --- a/config/.cvsignore +++ b/config/.cvsignore @@ -1,2 +1,3 @@ general database.yml +rails_env.rb diff --git a/config/boot.rb b/config/boot.rb index 128fe7645..53fbef5e6 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,5 +1,15 @@ # Don't change this file. Configuration is done 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 + unless defined?(RAILS_ROOT) root_path = File.join(File.dirname(__FILE__), '..') @@ -42,4 +52,4 @@ unless defined?(Rails::Initializer) end Rails::Initializer.run(:set_load_path) -end
\ No newline at end of file +end diff --git a/config/environment.rb b/config/environment.rb index 43e4ce9e1..ccf4c9ed6 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -3,8 +3,6 @@ # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way -# (Hmmm, that's a bit daft - as well as setting it in the web server, -# it also needs setting in all the scripts, so actually this is a good place) # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present |