更新样式回形针时出错

时间:2014-10-14 11:44:11

标签: ruby-on-rails ruby paperclip

我想在paperclip中更新我的样式,但是当我运行该命令时,会返回错误。这是我的风格代码:

image.rb

class Image < ActiveRecord::Base
  belongs_to :imageable, :polymorphic => true
  validates_presence_of :image
  has_attached_file :image, :processors => [:ffmpeg],
    :styles => { :video => { :geometry => "640x480", :format => 'mp4' },
    :thumb => { :geometry => "100x100>", :format => 'jpg' },
    :large => { :geometry => "400x300>", :format => 'jpg' },
    :medium => { :geometry => "400x200>", :format => 'png' },
    :icon => { :geometry => "36x36>", :format => 'jpg' },
    :profile => { :geometry => "28x28>", :format => 'jpg' } },
    :default_url => "/images/:style/missing.png"

end

返回错误:

Regenerating Image -> image -> [:icon, :large, :medium, :profile, :thumb, :video]
rake aborted!
Cocaine::CommandNotFoundError

我如何解决这个错误?

1 个答案:

答案 0 :(得分:0)

好像你没有安装“paperclip-ffmpeg”宝石。

请参阅此链接:https://github.com/owahab/paperclip-ffmpeg#requirements