gpt4 book ai didi

ruby-on-rails - rails + 载波 + 雾 + S3 套接字错误

转载 作者:行者123 更新时间:2023-12-03 07:31:49 25 4
gpt4 key购买 nike

我在尝试将 S3 服务与雾和 Jquery 文件上传 (https://github.com/blueimp/jQuery-File-Upload) 一起使用时遇到了这个问题

错误

Excon::Errors::SocketError (getaddrinfo: nodename nor servname provided, or not known (SocketError)): 

当我尝试在 Controller 中调用“保存”方法时会发生这种情况。我将载波设置如下:

配置/初始化程序/carrierwave.rb
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => 'access_key_here',
:aws_secret_access_key => 'secret_key_here',
:region => 'eu-east-1'
}
config.fog_directory = 'folder_name_here'
config.fog_public = false
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'}
config.storage = :fog
end

而我的上传者只是“config.storage :fog”和“store_dir”
现在,我已经创建了我的存储桶。

我错过了一些配置吗?
它甚至不适用于我的开发环境。

请任何帮助。提前致谢。

最佳答案

区域名称错误。它应该是“us-east-1”

关于ruby-on-rails - rails + 载波 + 雾 + S3 套接字错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12100909/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com