1
我得到了使用霧和AWS時突然出現以下錯誤:Rails的FOG:下面的鍵無效:方案:主機
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}"
也許有人知道發生了什麼問題?
我也有這個問題,即使我有霧'1.16.0'。 – JacobEvelyn
我也有使用霧'1.16.0'的問題。如果有幫助,我在使用Rmagick時沒有問題,但是當我嘗試切換到mini_magick時 – Cyrus
https://github.com/fog/fog/issues/2284 – Cyrus