Use config.eager_load_paths in production
See http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#autoloading-is-disabled-after-booting-in-the-production-environment
This commit is contained in:
parent
5905645d0f
commit
04c3880d79
2 changed files with 3 additions and 2 deletions
|
|
@ -35,8 +35,8 @@ module Diaspora
|
||||||
# -- all .rb files in that directory are automatically loaded.
|
# -- all .rb files in that directory are automatically loaded.
|
||||||
|
|
||||||
# Custom directories with classes and modules you want to be autoloadable.
|
# Custom directories with classes and modules you want to be autoloadable.
|
||||||
config.autoload_paths += %W{#{config.root}/app}
|
config.autoload_paths += %W[#{config.root}/app]
|
||||||
config.autoload_once_paths += %W{#{config.root}/lib}
|
config.autoload_once_paths += %W[#{config.root}/lib]
|
||||||
|
|
||||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
# Only load the plugins named here, in the order given (default is alphabetical).
|
||||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
# :all can be used as a placeholder for all plugins not explicitly named.
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ Rails.application.configure do
|
||||||
# and those relying on copy on write to perform better.
|
# and those relying on copy on write to perform better.
|
||||||
# Rake tasks automatically ignore this option for performance.
|
# Rake tasks automatically ignore this option for performance.
|
||||||
config.eager_load = true
|
config.eager_load = true
|
||||||
|
config.eager_load_paths += %W[#{config.root}/lib]
|
||||||
|
|
||||||
# Full error reports are disabled and caching is turned on.
|
# Full error reports are disabled and caching is turned on.
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue