diff config/application.rb @ 50:86948069ef60

Enables thread safety.
author Edho Arief <edho@myconan.net>
date Thu, 04 Oct 2012 03:43:40 +0700
parents 4aa8194a1733
children e8920b00035c
line wrap: on
line diff
--- a/config/application.rb	Thu Oct 04 03:08:00 2012 +0700
+++ b/config/application.rb	Thu Oct 04 03:43:40 2012 +0700
@@ -24,6 +24,10 @@
     # Custom directories with classes and modules you want to be autoloadable.
     # config.autoload_paths += %W(#{config.root}/extras)
 
+    # Enable threaded mode except for rake tasks as it doesn't work quite well
+    # Reference: http://groups.google.com/group/rubyonrails-core/browse_thread/thread/b13dbe0b8f12b7dc
+    config.threadsafe! unless $rails_rake_task
+
     # 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.
     # config.plugins = [ :exception_notification, :ssl_requirement, :all ]