- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我尝试在 Ruby on Rails 上传照片时使用 Paperclip在我的本地机器上,它运行良好。
当我尝试在带有 Apache 和 CentOS 的 Linux(Phusion Passenger 5.2)服务器上使用 Paperclip 在 Ruby on Rails 中上传照片时,我得到:
2 errors prohibited this user from being saved
There were problems with the following fields:
- Avatar /tmp/stream20091026-21120-1qdbnul-0 is not recognized by the 'identify' command.
- Avatar /tmp/stream20091026-21120-1qdbnul-0 is not recognized by the 'identify' command.
Paperclip.options[:command_path] = "/usr/local/bin"
Parameters: {"commit"=>"Upload", "action"=>"update", "_method"=>"put", "authenticity_token"=>"419410afc22737cd2f6b6096a95327db76a48ba9", "controller"=>"users", "user"=>{"avatar"=>#}} [paperclip] Saving attachments. [paperclip] An error was received while processing:
/tmp/stream20091026-20752-1g568yk-0 is not recognized by the 'identify' command.
最佳答案
识别是 ImageMagick 中的命令行实用程序包裹。
从它的主页:
The identify program describes theformat and characteristics of one ormore image files. It also reports ifan image is incomplete or corrupt. Theinformation returned includes theimage number, the file name, the widthand height of the image, whether theimage is colormapped or not, thenumber of colors in the image, thenumber of bytes in the image, theformat of the image (JPEG, PNM, etc.),and finally the number of seconds ittook to read and process the image.Many more attributes are availablewith the verbose option.
identify ~/capture.jpg
capture.jpg JPEG 1216x244 1216x244+0+0 8-bit DirectClass 97.7kb
如果收到错误,请尝试升级服务器上的 ImageMagick 包。您可以在此处找到更新的二进制版本:
关于ruby-on-rails - 回形针/乘客 NotIdentifiedByImageMagickError :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1623948/
我已经安装了一个带有 Paperclip 的 rails ,现在可以正常工作一段时间了,在最近的部署中它已经坏了。我相信它与 gemfile 更新同时发生,因为机器上的其他任何东西都没有改变。错误是:
几天来我一直在反对这个。最近,我的图片上传器停止正常工作。我已经调查了几种可能性,但没有一个建议的解决方案适用于我的情况。 错误信息是: # 以下是详细信息: Mac OS X 10.8.3 Imag
当我点击“创建用户”按钮时,出现以下错误: Avatar Paperclip::Errors::NotIdentifiedByImageMagickError 我的代码片段如下: gem 文件 sou
当我尝试上传不在 ["image/jpg", "image/jpeg", "image/gif", "image/png", "图片/pjpeg", "图片/x-png"] 当我尝试上传类似“wav”
当我尝试在 Ruby on Rails 上传照片时使用 Paperclip在我的本地机器上,它运行良好。 当我尝试在带有 Apache 和 CentOS 的 Linux(Phusion Passeng
使用回形针上传图片错误: 命令:: identify -format%wx%h'/tmp/103120121106-20384-i7dnzy.png[0]'[回形针]处理时收到错误: # 我发现确定:
我有一个带有附加视频的模型。我想创建视频的缩放版本以及一系列缩略图。我有以下设置: has_attached_file :video, styles: { original:
我正在尝试使用回形针上传 .pdf 和 .doc。 Command :: file -b --mime '/var/folders/86/5tdcyh5171j6twqqkt49tq040000gn/
直到今天,我已经安装了带有 Paperclip 的 Rails,运行良好了一段时间。我不知道是什么原因造成的。我试图了解 ImageMagick,所以我从官方网站下载了它。安装后,我收到有关 libp
我正在学习 Mattan Griffel 的“一个月 Rails”(http://onemonthrails.com/) 类(class)。我正在尝试使用回形针 gem 上传图像。最初的安装和使用都很
我在使用 mod_rails 将我的应用程序部署到运行 ubuntu 的服务器时遇到了麻烦。在服务器上运行 webrick 似乎很好,我可以保存文件,没问题。但是通过 nginx 运行应用程序,当我尝
我第一次尝试设置 Spree。一切都很顺利,直到我点击图片上传。我已经在 Mac OSX Mountain Lion 上使用自制软件安装了 Imageamgick。上传任何图片都会出现以下错误。 Pa
我有使用 Rails 4 和 Ruby 2 的应用程序。我开始使用 mongoid-paperclip,它运行良好。 我安装了 ImageMagick-6.8.6-8。我在 development.r
我正在 OneMonth.com 上学习 Mattan Griffel 的 Ruby on Rails 类(class),我们在其中创建了一个 Pinterest 克隆。我在我的计算机上设置 Imag
我是一名优秀的程序员,十分优秀!