PaperClipã使ãããã«ã¯ImageMagikãå¿ è¦ãªã®ã§ãã¤ã³ã¹ãã¼ã«ããã¦ããªãå ´åã¯ã¤ã³ã¹ãã¼ã«ããã # Macã®HomeBrewã§ã¤ã³ã¹ãã¼ã«ããå ´å brew install imagemagick Gemfile gem 'paperclip', '~> 4.1' Migration rails g migration AddFileUploadToItemImages class AddFileUploadToItemImages < ActiveRecord::Migration def change add_attachment :item_images, :image end end Model has_attached_file :image, :styles => { :medium => "300x300>", :thumb => "100x100>" }
{{#tags}}- {{label}}
{{/tags}}