You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like to have a hardcode version for development, so I modified it to take both. This way you don't need to set env variables on local dev environment. Just make sure to add aws.yml to your .gitignore
if Rails.env == "development"
AWS_Config = YAML.load_file("config/aws.yml")[Rails.env]
S3Multipart.configure do |config|
config.bucket_name = AWS_Config['bucket']
config.s3_access_key = AWS_Config['access_key_id']
config.s3_secret_key = AWS_Config['secret_access_key']
config.revision = AWS_Config['revision']
end
else
S3Multipart.configure do |config|
config.bucket_name = ENV['AWS_S3_BUCKET'],
config.s3_access_key = ENV['AWS_ACCESS_KEY_ID'],
config.s3_secret_key = ENV['AWS_SECRET_ACCESS_KEY'],
config.revision = "0.0.10.6"
end
end
I changed my config/initializers/s3_multipart.rb to look like this:
S3Multipart.configure do |config|
config.bucket_name = ENV['AWS_S3_BUCKET'],
config.s3_access_key = ENV['AWS_ACCESS_KEY_ID'],
config.s3_secret_key = ENV['AWS_SECRET_ACCESS_KEY'],
config.revision = "0.0.10.6"
end
The text was updated successfully, but these errors were encountered: