0

问候。我遇到了附件 fu 和 s3 的问题。

详细信息:生产服务器 - Ubuntu - imagemagick, rmagick aws-s3 gems are installed 。

错误启动应用程序:

vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/s3_backend.rb:173:in `included': undefined method `symbolize_keys' for nil:NilClass (NoMethodError)

见:http: //github.com/technoweenie/attachment_fu/blob/master/lib/technoweenie/attachment_fu/backends/s3_backend.rb

有没有人遇到过这个?似乎即使使用 config/amazon_s3.yml,也不会读取 YAML 文件。

4

1 回答 1

1

在这里大胆猜测一下,因为您链接到的文件与您正在使用的文件版本不同。self.included 中唯一提到的symbolize_keys

@@s3_config = @@s3_config = YAML.load(ERB.new(File.read(@@s3_config_path)).result)[RAILS_ENV].symbolize_keys

看着那个,我猜你没有当前环境的配置块 n config/amazon_s3.yml

即,如果您在生产模式下运行,则需要(至少)

production:
  bucket_name: appname
  photo_bucket_name: appname_photos
  access_key_id: <your key>
  secret_access_key: <your key>

在您的配置文件中。

于 2010-03-27T16:33:39.440 回答