Project

General

Profile

Feature #12097 » thread-r13171.diff

Toshi MARUYAMA, 2014-05-26 06:23

View differences:

config/application.rb
54 54

  
55 55
    config.session_store :cookie_store, :key => '_redmine_session'
56 56

  
57
    config.threadsafe!
58
    #config.cache_classes = false
59
    #config.eager_load    = false
60

  
57 61
    if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
58 62
      instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
59 63
    end
config/application.rb
58 58
    #config.cache_classes = false
59 59
    #config.eager_load    = false
60 60

  
61
    # http://hightechsorcery.com/2013/01/fixing-uninitialized-constant-errors-in-rake-tasks-when-using-rails-threadsafe-mode/
62
    # http://stackoverflow.com/questions/4300240/rails-3-rake-task-cant-find-model-in-production/4880253#4880253
63
    config.dependency_loading = true if $rails_rake_task
64

  
61 65
    if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
62 66
      instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb'))
63 67
    end
config/environments/production.rb
29 29
  config.action_mailer.logger = nil
30 30

  
31 31
  config.active_support.deprecation = :log
32
  
33
  # http://hightechsorcery.com/2013/01/fixing-uninitialized-constant-errors-in-rake-tasks-when-using-rails-threadsafe-mode/
34
  config.dependency_loading = true if $rails_rake_task
32 35
end
config/environments/test.rb
27 27
  config.active_support.deprecation = [:stderr, :log]
28 28

  
29 29
  config.secret_token = 'a secret token for running the tests'
30

  
31
  # http://hightechsorcery.com/2013/01/fixing-uninitialized-constant-errors-in-rake-tasks-when-using-rails-threadsafe-mode/
32
  config.dependency_loading = true if $rails_rake_task
30 33
end
(5-5/6)