到目前为止,我在开发环境中设置S3时没有遇到任何问题。我现在经常遇到以下永久重定向错误:
AWS::S3::Errors::PermanentRedirect at /locations/1
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
Paperclip工作得非常好。这个问题只出现在我试图将托管图像移动到S3上时。
1 /已安装AWS-SDK gems
// gemfile
gem 'aws-sdk', '< 2.0'
2 / Paperclip默认设置正确;我的bash_profile
//development.rb
config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => 'traipse-temp',
:access_key_id => ENV['AWS_ACCESS_KEY_ID'],
:secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
}
}
3 /我创建了一个标题为&#34; traipse-temp&#34;的S3桶。设置为US Standard
有没有人对我收到永久重定向错误的原因有任何见解?我已经设置了4个其他应用程序,这完全相同,但只有这个最新的项目我才收到这个第一次错误。
提前致谢。