0

不太清楚这里发生了什么,但是当我尝试将图像上传到我的 s3 存储桶时,我收到了这个错误

 NameError in PostsController#create

 uninitialized constant AWS::Core::ClientLogging

 Rails.root: /home/richardlewis/Rails/myblog
 Application Trace | Framework Trace | Full Trace

 app/controllers/posts_controller.rb:41:in `create'

我目前在我的开发环境中对此进行测试。这是我目前的设置

宝石文件

#Paperclip and aws
gem "paperclip", "~> 3.0"
gem 'aws-sdk'
gem 'aws-s3'

图像模型

class Image < ActiveRecord::Base
belongs_to :imageable, polymorphic: true

attr_accessible :photo
has_attached_file :photo, :styles => { :small_blog => "250x250#", :large_blog => "680x224#", :thumb => "95x95#" },
 :storage => :s3,
 :url  => ":s3_domain_url",
 :s3_protocol => 'http',
 :path => "/images/:id/:style.:extension",
 :s3_credentials => {
 :bucket => ENV['AWS_BUCKET'],
 :access_key_id => ENV['AWS_ACCESS_KEY_ID'],
 :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
}
end

我的 ENV 变量存储在 env.rb 文件中并在初始化程序中加载

有没有人遇到过这个?

4

1 回答 1

1

升级到最新的回形针,3.5.1将解决此问题。

于 2013-09-05T21:29:48.180 回答