1

FOG と AWS を使用しているときに突然次のエラーが発生しました。

The following keys are invalid: :scheme, :host
Expected(200) <=> Actual(403 Forbidden)

このエラーは、バンドルの更新を行った後に発生しました。突然何がうまくいかないのかわかりません。

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}"

多分誰かが何がうまくいかないのか知っていますか?

4

1 に答える 1