mygallery multi-user sample code with paperclip. Make sure you have imagemagick installed.