I use Carrerwave 0.5.3 and get a 404 error when I call Picture.save in the Create method of my image controller. Following the instructions in lib / carrierwave / storage / s3.rb I have the following initialization file (config / initializers / carrierwave_fog.rb):
CarrierWave.configure do |config|
config.s3_access_key_id = "xxxxx"
config.s3_secret_access_key = "xxxxx"
config.s3_bucket = "mybucket" #already created in my S3 account
end
In photo_uploader.rb, I have:
class PhotoUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick
storage :s3
def store_dir
"uploads" # already created in my s3 account
end
def cache_dir
"uploads/cache" #already created in my s3 account
end
end
Exact error:
Excon::Errors::NotFound in PicturesController#create
Expected(200) <=> Actual(404 Not Found)
request => {:expects=>200}
response => #<Excon::Response:0x00000104a72448 @body="", @headers={}, @status=404>
I found a somewhat similar question here Carrierwave and s3 with the heroku undefined error using the `fog_credentials = 'method . But in this case, apparently, worked on how I do it. Unfortunately, this is not for me.
. , , AWS S3 .
, . ?