首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rails迷雾:下列键无效::host,:host

Rails迷雾:下列键无效::host,:host
EN

Stack Overflow用户
提问于 2013-10-08 12:39:10
回答 1查看 148关注 0票数 1

在使用FOG和AWS时,我会突然出现以下错误:

代码语言:javascript
复制
The following keys are invalid: :scheme, :host
Expected(200) <=> Actual(403 Forbidden)

执行包更新后发生此错误。我只是不明白它突然出问题了。

代码语言:javascript
复制
fog_connection = Fog::Storage.new({:provider => 'AWS',:aws_access_key_id => CUBE_CONF['aws']['access_key'],:aws_secret_access_key => CUBE_CONF['aws']['secret_key'],:region => 'eu-west-1'})

  puts "VideoEntryPandaWorker: established connection with S3"
  # setting the directory
  fog_directory = fog_connection.directories.new(:key => CUBE_CONF['panda']['s3_bucket'])
  puts "VideoEntryPandaWorker: fetched directories from #{CUBE_CONF['panda']['s3_bucket']}"

  # uploading the file
  puts "VideoEntryPandaWorker: creating fog file with src: #{video_entry.video_file.current_path}"
  file = fog_directory.files.new({
                                 :key    => video_entry.video_name,
                                 :body   => File.open(video_entry.video_file.current_path),
                                 :public => true
                             })
  file.save
  puts "VideoEntryPandaWorker: S3 url #{file.public_url}"

也许有人知道出了什么问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-10-08 16:20:37

我只是亲身体验过这一点,当时我运行的是Fog 1.11.1,升级到1.15.0解决了这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19247937

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档