开发者

Uploading an image file with Paperclip (in RoR) causing error

This should be a simple thing to do, but I'm running into a wall and I'm not sure how to debug this response.

In my Image model, I have:

class Image < ActiveRecord::Base
  has_attached_file :image, :styles =&开发者_StackOverflowgt; {  :display => "500x500>",
                                          :thumbnail => "95x95>"}

Then in my Views, my form contains this:

-form_for @image, :html => { :multipart => true } do |image|
    %tr
      %td.woc_left
        =label_tag :image, 'photo to upload', :class => 'required'
      %td.woc_center
        =image.file_field :image

In my Mysql table, I have a column called "image_file_name" (string).

However, when I try to upload an image and submit it, I see

2 errors prohibited this from being saved
There were problems with the following fields:
Image Paperclip::CommandNotFoundError
Image Paperclip::CommandNotFoundError

What am I doing wrong? Thank you for your help!


Paperclip relies on external tools to resize the images. It looks like you either don't have the tools installed or they are not found.

I've used ImageMagick but other tools may be usable by Paperclip.

Which environment are you running on?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜