From f0eaf20f863f0f1fdcf01b620529f68609d4e0da Mon Sep 17 00:00:00 2001 From: Jesse Wolfe Date: Sun, 8 Nov 2009 15:36:52 -0800 Subject: Fixing #2764 ActiveRecord 2.1 support Suprisingly, I found that setting allow_concurrency made the "MySQL server has gone away" stop occuring even if the MySQL server drops connections. This may be the only change needed to restore compatibility with ActiveRecord 2.1.x Signed-off-by: Jesse Wolfe --- lib/puppet/rails.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/puppet/rails.rb') diff --git a/lib/puppet/rails.rb b/lib/puppet/rails.rb index fc8eacd68..87f1bb1fb 100644 --- a/lib/puppet/rails.rb +++ b/lib/puppet/rails.rb @@ -22,6 +22,10 @@ module Puppet::Rails ActiveRecord::Base.logger.level = Logger::DEBUG end + if (::ActiveRecord::VERSION::MAJOR == 2 and ::ActiveRecord::VERSION::MINOR <= 1) + ActiveRecord::Base.allow_concurrency = true + end + ActiveRecord::Base.verify_active_connections! begin -- cgit