I have a model named VehiclePhotos and it has attachment field 'photo'. I used paperclip gem for uploading photos. Uploading was fine without any error. but when I tried to download the image, it gives
'500 Internal Server Error'.
log does not shows any error details.
vehicle_photos.rb
class VehiclePhotos < ActiveRecord::Base
has_attached_file :photo,
:url => "/uploads/:class/:id/:attachment/:attachment_fullname?:timestamp",
:path => "uploads/:class/:attachment/:id_partition/:style/:basename.:extension"
end
in view, given following code to download
<%= link_to @object.photo_file_name , @object.photo.url %>
The file which contains uploaded photos has name 'vehicle_photos' and it has permission 777.