Created
October 3, 2016 18:21
-
-
Save dlackty/f07f40b67e0a043fccd11437e25bffd2 to your computer and use it in GitHub Desktop.
Fixing for AWS SDK for Ruby under multi-threading environment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/aws-sdk.rb | |
require "aws-sdk" | |
# Threading in modern rails means the AWS autoloading can lead to partially | |
# loaded namespaces unless we eager load up front. But only do it when we're | |
# eager loading generally (in production). | |
Rails.application.config.before_eager_load do | |
Aws.eager_autoload! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment