2011-06-08 128 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