PhotoShare-server is a project mainly written in Ruby, it's free.
Server side code, currently running on Heroku, for PhotoShare