From 336dba414e9d5c049d43f942a164c8db225b078c Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 22 Apr 2015 13:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=93=E5=AD=98=E4=BF=AE=E6=94=B9=E4=B8=BAre?= =?UTF-8?q?dis=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Gemfile | 1 + config/additional_environment.rb | 10 ---------- config/application.rb | 2 -- config/environments/production.rb | 7 ++++++- 5 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 config/additional_environment.rb diff --git a/.gitignore b/.gitignore index a6ee997aa..96788ad9a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ *.swp /config/database.yml /config/configuration.yml +/config/additional_environment.rb /files/* /log/* /public/tmp/* diff --git a/Gemfile b/Gemfile index 679e0a5b2..d5fe6c581 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ unless RUBY_PLATFORM =~ /w32/ gem 'iconv' end +gem 'redis-rails' gem 'rubyzip' gem 'delayed_job_active_record'#, :group => :production gem 'daemons' diff --git a/config/additional_environment.rb b/config/additional_environment.rb deleted file mode 100644 index 6654da90f..000000000 --- a/config/additional_environment.rb +++ /dev/null @@ -1,10 +0,0 @@ -# Copy this file to additional_environment.rb and add any statements -# that need to be passed to the Rails::Initializer. `config` is -# available in this context. -# -# Example: -# -# config.log_level = :debug -# ... -# -#config.relative_url_root = '/socialforge' diff --git a/config/application.rb b/config/application.rb index 05160d03e..57ae436cb 100644 --- a/config/application.rb +++ b/config/application.rb @@ -67,8 +67,6 @@ module RedmineApp # Do not include all helpers config.action_controller.include_all_helpers = false - config.session_store :cookie_store, :key => '_redmine_session' - if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) end diff --git a/config/environments/production.rb b/config/environments/production.rb index 160e0b8b0..63931fa33 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -19,7 +19,12 @@ RedmineApp::Application.configure do # Full error reports are disabled and caching is turned on config.logger = Logger.new('log/production.log', 'daily',1048576) # daily, weekly or monthly config.action_controller.perform_caching = true - config.cache_store = :file_store, "#{Rails.root }/files/cache_store/" + + # to additional_environment.rb + # config.cache_store = :file_store, "#{Rails.root }/files/cache_store/" + # config.cache_store = :redis_store, 'redis://localhost:6379/0/cache', { expires_in: 90.minutes } + # + # Enable serving of images, stylesheets, and javascripts from an asset server # config.action_controller.asset_host = "http://assets.example.com"