Reputation: 4568
Image Uploading was working fine, but when I tried switching it to S3, it started throwing an error. I get the following error when I try to create a new image upload:
cannot load such file -- aws-sdk (You may need to install the aws-sdk gem)
Relevant gems:
gem 'rails', '3.2.5'
gem 'paperclip'
gem 'aws-sdk'
config/s3.yml:
development:
bucket: bucketname
access_key_id: #
secret_access_key: #
test:
bucket: bucketname
access_key_id: #
secret_access_key: #
image_upload.rb:
has_attached_file :image,
:styles => {
:normal => "1680x6000",
:result => "560x3000",
:thumb => "140x500" },
:path => ":attachment/:style/:normalized_file_name.:extension",
:storage => :s3,
:s3_credentials => "#{Rails.root}/config/s3.yml"
Things I have tried:
Thank you for the help!!
Upvotes: 2
Views: 2796
Reputation: 4568
A little embarrassing... I just needed to restart rails server. Can't believe I forgot to do that.
Upvotes: 6
Reputation: 1502
What happens if you add require 'rubygems'
to the top of the file where you are requiring aws-sdk?
Upvotes: 0