- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个带有附加视频的模型。我想创建视频的缩放版本以及一系列缩略图。我有以下设置:
has_attached_file :video,
styles: {
original: { format: 'mp4', processors: [:transcoder] },
large: { geometry: "720x720", format: 'jpg', processors: [:thumbnail] },
medium: { geometry: "540x540", format: 'jpg', processors: [:thumbnail] },
thumb: { geometry: "180x180", format: 'jpg', processors: [:thumbnail] }
},
default_url: ""
Validation failed: Video Paperclip::Errors::NotIdentifiedByImageMagickError
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/validations.rb:78:in `raise_validation_error'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/validations.rb:50:in `save!'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/attribute_methods/dirty.rb:30:in `save!'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:324:in `block in save!'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:395:in `block in with_transaction_returning_status'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `block in transaction'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/transaction.rb:189:in `within_new_transaction'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/connection_adapters/abstract/database_statements.rb:232:in `transaction'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:211:in `transaction'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:392:in `with_transaction_returning_status'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/transactions.rb:324:in `save!'
/app/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.2/lib/active_record/suppressor.rb:45:in `save!'
/app/app/models/concerns/snapshot_methods.rb:37:in `copy_from_ziggeo!'
/app/app/workers/snapshot_transcoder.rb:16:in `perform'
/app/vendor/bundle/ruby/2.3.0/gems/resque-status-0.5.0/lib/resque/plugins/status.rb:161:in `safe_perform!'
/app/vendor/bundle/ruby/2.3.0/gems/resque-status-0.5.0/lib/resque/plugins/status.rb:137:in `perform'
NotIdentifiedByImageMagickError
并扫描了有关此问题的许多其他问题,但没有成功解决我的问题。
Paperclip.options[:command_path] = "/usr/bin/identify"
开发中。由于我的问题仅在生产中,我尝试将其应用于生产,为我的生产环境选择正确的路径,如下所示:
Paperclip.options[:command_path] = "/app/vender/imagemagick/bin/identify"
/app/vender/imagemagick/bin
也没有.
最佳答案
经过多次头疼后,我设法通过清除我的应用程序的缓存并重新安装 ImageMagick 来解决这个问题。以下是我采取的步骤:
heroku repo:purge_cache -a APP_NAME
. git commit --allow-empty -m "Hope this works"
git push heroku master
关于ffmpeg - 验证失败:Video Paperclip::Errors::NotIdentifiedByImageMagickError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43051901/
我已经安装了一个带有 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
我是一名优秀的程序员,十分优秀!