2011-06-08 72 views
0

我想安裝回形針發佈到我的亞馬遜s3帳戶。Amazon S3配置與回形針

這是有錯誤,我回去:

LoadError in PostsController#create 
no such file to load -- aws/s3 (You may need to install the aws-s3 gem) 
Rails.root: /Users/tonybeninate/Documents/Apps/PhotoBlog 

Post模型

class Post < ActiveRecord::Base 
# Paperclip 
has_attached_file :photo, 
:storage => :s3, 
:path => "/:attachment/:id/:style/:filename", 
:s3_credentials => Rails.root.join("config/s3.yml"), 
:styles => { 
    :thumb => "100x100#", 
    :small => "150x150>", 
    :large => "725x725" } 
end 

s3.yml(我代替我的密鑰和祕密密鑰)

bucket: <%= ENV['tbhockeyboy'] || 'paperclip' %> 
access_key_id: <%= ENV['my_access_key'] %> 
secret_access_key: <%= ENV['my_secret_key'] %> 

我有安裝了aws-s3 gem。有什麼想法嗎?

回答

0

您是否得到了修正?請確保你在你的Gemfile有

gem 'aws-s3' 

,並運行bundle install.

3

或者,嘗試使用

gem 'aws-sdk' 
在你的Gemfile

bundle install