I am pulling my hair out here... I have no idea why this isn't working.
I am using ruby 1.8.7, rails 3.0.19, paperclip 2.7.4.
My model:
has_attached_file :photo, :styles => {
:logo => "60x20",
:widget => "60x40",
:thumb=> "100x100",
:small => "150x150>" },
:url => "/images/companies/:id/:style/:basename.:extension",
:path => ":rails_root/public/images/companies/:id/:style/:basename.:extension",
:default_url => "/images/bb_noimage.png"
#validates_attachment_presence :photo
validates_attachment_size :photo, :less_than => 3.megabytes
validates_attachment_content_type :photo, :content_type => ['image/jpeg', 'image/png','image/gif','image/jpg']
In views:
<%= image_tag "#{get_image_url(company.id,company.photo_file_name,"small")}"%>
The problem is some folders will have a "large" and "thumb" size but will not have a "small" and "logo" size - I am revisiting this site after a long time of having not used it. I want the missing styles to be generated. I tried these commands and the first shows no error, but the second shows the error below. Niether generate the needed thumbnails. Thank you for your help!
bundle exec rake paperclip:refresh:thumbnails CLASS=Company
bundle exec rake paperclip:refresh:missing_styles --trace
** Execute paperclip:refresh:thumbnails
rake aborted!
No such file or directory - /Users/q/Sites/baiabase-old/public/system/paperclip_attachments.yml
/Users/q/.rvm/gems/ruby-1.8.7-p302@baia-old/gems/paperclip-2.7.4/lib/paperclip/missing_attachment_styles.rb:25:in `initialize'