“identify”命令无法识别图像文件。 (Heroku的)
我正在努力让Paperclip与Heroku和Amazon S3合作。
在localhost(mac OS和Amazon)上一切正常,但是当我部署到heroku并尝试该function时,我有这个错误:
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(只有回形针部分):
gem "paperclip" gem "rmagick", :require => 'RMagick' gem 'aws-sdk', '~> 1.3.4'
我没有在我的environment.rb或production.rb中设置Paperclip.options [:command_path]所以这方面没问题。
这是我的模型:
class Area { :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
有什么线索吗? 我已经抓住了关于它的每个主题,似乎没有任何工作……
谢谢
显然,Cocaine gem(0.4.0)的新更新打破了Paperclip和ImageMagick的文件名。 尝试回滚到以前的版本(0.3.2),它对我有用。
看这里:
https://github.com/thoughtbot/paperclip/issues/1038
PS我相信Heroku不再需要RMagick,没有它就能正常工作
- 回形针可以从S3铲斗中读取照片几何图形吗?
- `fetch’:找不到键:“S3_BUCKET_NAME”(KeyError)with paperclip / aws s3 / rails
- 阻止资产在本地进行预编译,以进行heroku rails asset_sync s3应用程序的本地生产测试
- Paperclip,S3,Heroku:缺少图像
- S3存储桶的基本AWS IAM权限
- Carrierwave – 仅在从存储中删除已装入的文件后销毁对象
- 我们可以找到Paperclip下载完成的时间吗?
- 密钥就在那里,但我仍然得到`fetch’:找不到密钥:“S3_BUCKET_NAME”(KeyError)
- 如何在Python中解密AWS Ruby客户端加密