Gallerize is a project mainly written in Ruby, it's free.
HTML photo galleries from directories of images
404: Not Found