diff options
author | Christoph Helma <helma@in-silico.de> | 2010-02-01 16:19:13 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2010-02-01 16:19:13 +0100 |
commit | 70fef6f3fbf3e629947534949774d93dc5ea7fe2 (patch) | |
tree | d5483d22612d0c0d3b5b41f1602d9be27c1a2694 | |
parent | 3925785d70b541345bdbbbad7a8fce18eeaa01db (diff) |
central configuration for config.ru added
-rw-r--r-- | lib/tasks/config.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tasks/config.rb b/lib/tasks/config.rb new file mode 100644 index 0000000..3720ef3 --- /dev/null +++ b/lib/tasks/config.rb @@ -0,0 +1,19 @@ +require 'rubygems' +require 'rack' +require 'rack/contrib' +require 'application.rb' + +# log at centralized place +logfile = "#{LOG_DIR}/#{ENV["RACK_ENV"]}.log" +log = File.new(logfile, "a+") +$stdout.reopen(log) +$stderr.reopen(log) +$stdout.sync = true +$stderr.sync = true +set :raise_errors, true + +['public','tmp'].each do |dir| + FileUtils.mkdir_p dir unless File.exists?(dir) +end + +use Rack::ShowExceptions |