Skip to content

Instantly share code, notes, and snippets.

@nickmarden
Created December 19, 2011 18:20
Show Gist options
  • Save nickmarden/1498254 to your computer and use it in GitHub Desktop.
Save nickmarden/1498254 to your computer and use it in GitHub Desktop.
Running the paperclip-spike migrations and accessing paperclip-enabled models afterward
[nick@nick-mba paperclip-spike] (master)$ bundle exec rake db:migrate
== PaperclipMeta: migrating ==================================================
-- add_column(:uploaded_images, :img_meta, :text)
-> 0.0315s
...
== PaperclipMeta: migrated (0.0772s) =========================================
== PaperclipifyUploadedImages: migrating =====================================
-- execute("CREATE TABLE attachment_fu_uploaded_images_backup AS SELECT * FROM uploaded_images")
-> 0.0219s
...
== PaperclipifyUploadedImages: migrated (0.2706s) ============================
[nick@nick-mba paperclip-spike] (master)$ bundle exec rake paperclip:convert
[nick@nick-mba paperclip-spike] (master)$ bundle exec ruby avatar.rb
original: https://s3.amazonaws.com/satisfaction-development/public/uploaded_images/7/285061_10150262017878246_648083245_7882962_781965_n.jpeg
large: https://s3.amazonaws.com/satisfaction-development/public/uploaded_images/7/285061_10150262017878246_648083245_7882962_781965_n_large.jpeg (100x100; 61552 bytes)
medium: https://s3.amazonaws.com/satisfaction-development/public/uploaded_images/7/285061_10150262017878246_648083245_7882962_781965_n_medium.jpeg (55x55; 61552 bytes)
small: https://s3.amazonaws.com/satisfaction-development/public/uploaded_images/7/285061_10150262017878246_648083245_7882962_781965_n_small.jpeg (30x30; 61552 bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment