Paperclip:undefined方法`force_encoding'代表“:acl =>:private”:String

时间:2012-08-27 21:31:32

标签: ruby-on-rails ruby paperclip

我正在尝试使用Paperclip(2.7版)将文件上传到AWS。

错误:

app/controllers/groups_controller.rb:55:in `group_upload'

完整追踪:

/Users/.bundler/ruby/1.8/paperclip-70f0f1fea030/lib/paperclip/storage/s3.rb:105:in `summarize_hash' activesupport (3.2.1) lib/active_support/dependencies.rb:202:in 'map'
/Users/.bundler/ruby/1.8/paperclip-70f0f1fea030/lib/paperclip/storage/s3.rb:105:in `each'
/Users/.bundler/ruby/1.8/paperclip-70f0f1fea030/lib/paperclip/storage/s3.rb:105:in `map'
/Users/.bundler/ruby/1.8/paperclip-70f0f1fea030/lib/paperclip/storage/s3.rb:105:in `summarize_hash'

在我的模型中,我有这段代码:

has_attached_file :document,
  :storage => :s3,
  :bucket => 'studeous_users',
  :s3_credentials => {
    :access_key_id => 'AKIAJBW7LZFUHME57YZQ',
    :secret_access_key => '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'
  },
  :s3_permissions => :private

在我的gemfile中:

gem 'aws-s3'
gem 'aws-sdk'
gem "paperclip", "~> 2.7"

0 个答案:

没有答案