Displaying 1 result from an estimated 1 matches for "first_gallery".
2006 Aug 11
1
Absolute path to public/images in rake task?
...ization done ---''
end
# File app/models/photo_gallery.rb
class PhotoGallery < ActiveRecord::Base
# associations...
def self.synchronize_photos
photo_galleries = PhotoGallery.find :all
photo_galleries.each do | photo_gallery |
Dir.foreach("/images/photo_galleries/first_gallery") do | x | #
Iterate through the dir of photos files...
puts "Got #{x}"
end
end
nil
end
end
When running rake synchronize_photo_galleries I sadly get the following
error:
rake aborted!
No such file or directory - /images/photo_galleries/first_gallery
The...