I''m using paperclip for uploading images, and I''m running into
a weird
error:
2 errors prohibited this billboard from being saved
There were problems with the following fields:
* Image
/var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not
recognized by the ''identify'' command.
* Image
/var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not
recognized by the ''identify'' command.
This only happens when I try to upload a .jpg. I can do .png and .gif
just fine.
I can run identify from the application root directory. Here is my
model.
class Billboard < ActiveRecord::Base
has_attached_file :image,
:url =>
"/assets/:class/:id/:attachment/:style.:extension",
:path =>
":rails_root/public/assets/:class/:id/:attachment/:style.:extension",
:default_url =>
"/images/billboard_default.jpg",
:styles => {:main => "905x268#", :thumb
=>
"100x30>"}
end
jeremy-woertinks-imac:ecr jeremywoertink$ which identify
/usr/local/bin/identify
jeremy-woertinks-imac:ecr jeremywoertink$ identify -version
Version: ImageMagick 6.6.2-1 2010-06-02 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:
Has anyone had this issue?
Thanks,
~Jeremy
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
Is JPG support compiled into Imagemagick? If you run identify directly on your image does it work? Or complain? On Jun 8, 2010, at 9:25 AM, Jeremy Woertink wrote:> I''m using paperclip for uploading images, and I''m running into a weird > error: > > > 2 errors prohibited this billboard from being saved > There were problems with the following fields: > > * Image > /var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not > recognized by the ''identify'' command. > * Image > /var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not > recognized by the ''identify'' command. > > > > This only happens when I try to upload a .jpg. I can do .png and .gif > just fine. > I can run identify from the application root directory. Here is my > model. > > > > class Billboard < ActiveRecord::Base > > has_attached_file :image, > :url => > "/assets/:class/:id/:attachment/:style.:extension", > :path => > ":rails_root/public/assets/:class/:id/:attachment/:style.:extension", > :default_url => "/images/billboard_default.jpg", > :styles => {:main => "905x268#", :thumb => > "100x30>"} > end > > > > jeremy-woertinks-imac:ecr jeremywoertink$ which identify > /usr/local/bin/identify > jeremy-woertinks-imac:ecr jeremywoertink$ identify -version > Version: ImageMagick 6.6.2-1 2010-06-02 Q16 http://www.imagemagick.org > Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC > Features: > > > Has anyone had this issue? > > Thanks, > ~Jeremy > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Philip Hallstrom wrote:> Is JPG support compiled into Imagemagick? > > If you run identify directly on your image does it work? Or complain?I ran the little test that generates the logo.gif. jeremywoertink$ /usr/local/bin/convert logo: logo.gif The logo shows up fine, and I can upload it as my billboard.image just fine. I installed ImageMagick through the macports. Variants: graphviz, gs, hdri, jbig, jpeg2, lqr, mpeg, no_plus_plus, no_x11, perl, [+]q16, q32, q8, rsvg, universal, wmf -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Paperclip.options[:image_magick_path] = "/opt/local/bin" Paperclip.options[:command_path] = "/opt/local/bin" add something like these two commands to paperclip.rb in initializers folder just point to right identify command path On 6/8/10, Philip Hallstrom <philip-LSG90OXdqQE@public.gmane.org> wrote:> Is JPG support compiled into Imagemagick? > > If you run identify directly on your image does it work? Or complain? > > On Jun 8, 2010, at 9:25 AM, Jeremy Woertink wrote: > >> I''m using paperclip for uploading images, and I''m running into a weird >> error: >> >> >> 2 errors prohibited this billboard from being saved >> There were problems with the following fields: >> >> * Image >> /var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not >> recognized by the ''identify'' command. >> * Image >> /var/folders/bh/bh5FVAlvF5C38oqg94dcbU+++TI/-Tmp-/stream.1605.0 is not >> recognized by the ''identify'' command. >> >> >> >> This only happens when I try to upload a .jpg. I can do .png and .gif >> just fine. >> I can run identify from the application root directory. Here is my >> model. >> >> >> >> class Billboard < ActiveRecord::Base >> >> has_attached_file :image, >> :url => >> "/assets/:class/:id/:attachment/:style.:extension", >> :path => >> ":rails_root/public/assets/:class/:id/:attachment/:style.:extension", >> :default_url => "/images/billboard_default.jpg", >> :styles => {:main => "905x268#", :thumb => >> "100x30>"} >> end >> >> >> >> jeremy-woertinks-imac:ecr jeremywoertink$ which identify >> /usr/local/bin/identify >> jeremy-woertinks-imac:ecr jeremywoertink$ identify -version >> Version: ImageMagick 6.6.2-1 2010-06-02 Q16 http://www.imagemagick.org >> Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC >> Features: >> >> >> Has anyone had this issue? >> >> Thanks, >> ~Jeremy >> -- >> Posted via http://www.ruby-forum.com/. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Talk" group. >> To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
catz wrote:> Paperclip.options[:image_magick_path] = "/opt/local/bin" > Paperclip.options[:command_path] = "/opt/local/bin" > > add something like these two commands to paperclip.rb in initializers > folder > > just point to right identify command pathThe second one worked. I guess the first one is deprecated now? It''s just weird that it would work for .gif and .png images without that initializer, but not for .jpg. Must be something with one of ImageMagick dependencies... Thanks for the help! ~Jeremy -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.