我正在尝试使用Heroku和Amazon S3配置Paperclip。
在本地主机(Mac OS和Amazon)上一切正常,但在部署到Heroku并尝试使用该功能时,出现以下错误:
有什么线索吗?我已经爬过所有相关的主题,但似乎没有任何作用...谢谢。
在本地主机(Mac OS和Amazon)上一切正常,但在部署到Heroku并尝试使用该功能时,出现以下错误:
2 errors prohibited this area from being saved:
Asset /tmp/paris20121005-2-2cwxgx.jpg is not recognized by the 'identify' command.
Asset /tmp/paris20121005-2-2cwxgx.jpg is not recognized by the 'identify' command.
当我在模型中删除:styles => { }选项时,它可以工作,但是文件不会被处理(我需要不同的图像尺寸)。
我还在我的gemfile中使用了rmagick gem。
这是我的gemfile(仅包含paperclip部分):
gem "paperclip"
gem "rmagick", :require => 'RMagick'
gem 'aws-sdk', '~> 1.3.4'
我没有在我的environment.rb或production.rb中设置Paperclip.options [:command_path],所以这方面没有问题。
这是我的模型:
class Area < ActiveRecord::Base
require 'RMagick'
has_attached_file :asset, :styles => { :medium => "300x300>", :thumb => "180x190>" },
:storage => :s3,
:s3_credentials => "#{::Rails.root.to_s}/config/s3.yml",
:url => :s3_domain_url.to_s,
:path => "/:style/:id/:filename"
end
有什么线索吗?我已经爬过所有相关的主题,但似乎没有任何作用...谢谢。