Ruby 2.1.4, Rails 4.1.7 で確認 画像アップロード機能を作成する際に carrierwaveをよく使うのですが毎回調べているので基本的な設定部分のメモを残しておきます。 1. carrierwaveの初期設定Gemfileに以下を追加gem 'carrierwave', github: 'carrierwaveuploader/carrierwave'bundle installbundle install --path vendor/bundler適当なmodel作成(今回はuserモデルを作ってみます)./bin/rails g model usermigration作成# db/migrate/20141120154624_create_users.rb class CreateUsers < ActiveRecord::Migration def change
![[rails]carrierwaveを使って画像を保存するAPIサンプル](https://cdn-ak-scissors.b.st-hatena.com/image/square/1a64cc21309639f33304c4730f8ddaaf393eeaf8/height=288;version=1;width=512/https%3A%2F%2Fblog.hilotter.com%2Ffavicon%2Fogp.png)