Use latest stable paperclip
intall gem masonry and and put the lines in applocation js and css, just first part -25-