public
Description: Sample Rails 2.3 apps showing usage of Paperclip + S3 on Heroku
Homepage: paperclip-demo.heroku.com
Clone URL: git://github.com/pedro/paperclip-on-heroku.git
name age message
file .gems Thu Mar 19 15:09:30 -0700 2009 set paperclip to use s3 as the storage [Pedro Belo]
file .gitignore Thu Mar 19 14:17:37 -0700 2009 ignoring sqlite3 dbs [Pedro Belo]
file README.rdoc Thu Mar 19 17:48:52 -0700 2009 added summary to readme. format as rdoc [Pedro Belo]
file Rakefile Thu Mar 19 14:10:55 -0700 2009 blank rails 2.3 app [Pedro Belo]
directory app/ Fri Mar 20 13:23:54 -0700 2009 fix check to see if photo exists [Pedro Belo]
directory config/ Thu Mar 19 15:09:30 -0700 2009 set paperclip to use s3 as the storage [Pedro Belo]
directory db/ Thu Mar 19 14:18:29 -0700 2009 user has_attached_file [Pedro Belo]
directory doc/ Thu Mar 19 14:10:55 -0700 2009 blank rails 2.3 app [Pedro Belo]
directory public/ Thu Mar 19 14:48:03 -0700 2009 added user scaffold with multipart form + file box [Pedro Belo]
directory script/ Thu Mar 19 14:10:55 -0700 2009 blank rails 2.3 app [Pedro Belo]
directory test/ Thu Mar 19 14:48:03 -0700 2009 added user scaffold with multipart form + file box [Pedro Belo]
directory vendor/ Thu Mar 19 14:14:03 -0700 2009 installed paperclip plugin [Pedro Belo]
README.rdoc

Paperclip + S3 on Heroku

Summary

  • Add a .gems file with the "right_aws" gem
  • Insert your S3 credentials in config/s3.yml
  • Provide S3 related options when calling has_attached_file

A few things to notice

  • Pay special attention when copying code from tutorials. Some text converting filters like Textile and SmartyPants will convert "100x100" to "100×100" (notice how the "x" character was converted to ASCII 215, which will be passed to ImageMagick and cause a failure).
  • Paperclip by default swallows STDERR when calling ImageMagick, making it hard to debug problems with its binaries. To avoid this behavior you might want to disable it with:

    Paperclip.options[:swallow_stderr] = false