It is my User.rb model, My images are not stored in my assets directory.. has_attached_file :photo, :styles => { :small => "100x100#", :large => "500x500>", :thumb => "60x60>" }, :url => "/assets/users/:id/:style/:basename.:extension", :path => ":rails_root/public/assets/users/:id/:style/:basename.:extension" validates_attachment_presence :photo validates_attachment_size :photo, :less_than => 5.megabytes validates_attachment_content_type :photo, :content_type => [''image/jpeg'', ''image/png''] Please advice me... -- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/by1i65Un6VkJ. For more options, visit https://groups.google.com/groups/opt_out.
bertly_the_coder
2012-Aug-18 19:38 UTC
Re: Paperclip images are not stored in my directory
Without digging too deep, I''ve never seen :rails_root before, could you mean "#{Rails.root/public/assets/users/:id/:style/:basename.:extension}"? (in Rails 3). On Saturday, August 18, 2012 8:17:51 AM UTC+3, Maddy wrote:> > It is my User.rb model, > My images are not stored in my assets directory.. > > has_attached_file :photo, :styles => { :small => "100x100#", :large => > "500x500>", :thumb => "60x60>" }, > :url => > "/assets/users/:id/:style/:basename.:extension", > :path => > ":rails_root/public/assets/users/:id/:style/:basename.:extension" > > validates_attachment_presence :photo > validates_attachment_size :photo, :less_than => 5.megabytes > validates_attachment_content_type :photo, :content_type => > [''image/jpeg'', ''image/png''] > > Please advice me... >-- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/5VUKA2_BVZwJ. For more options, visit https://groups.google.com/groups/opt_out.
On Saturday, 18 August 2012 01:17:51 UTC-4, Maddy wrote:> > It is my User.rb model, > My images are not stored in my assets directory.. > > has_attached_file :photo, :styles => { :small => "100x100#", :large => > "500x500>", :thumb => "60x60>" }, > :url => > "/assets/users/:id/:style/:basename.:extension", > :path => > ":rails_root/public/assets/users/:id/:style/:basename.:extension" > >I''d recommend a name other than ''assets'' for this directory - the asset pipeline uses that URL, so you''re likely to get strange behavior (especially in development mode) if you use it as well. Other than that, you''ll need to provide more detail about what happens, any error messages, etc. The uploaded files clearly go *somewhere*... --Matt Jones -- 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 To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zHzpWGBsc_8J. For more options, visit https://groups.google.com/groups/opt_out.