Posts in uploading

Implementing CarrierWave - a Simple Guide

This weekend I decided to add file uploads to a small project I’ve been working on (mostly to get some additional rails practice). After searching for a while, I came across Carrierwave, which is a simple ruby gem that sets you up with easy image uploading and processing.

The setup was a lot easier than I expected. First step was to add the carrierwave gem to the project’s gemfile and run ‘bundle install’. Straightforward. After this, run ‘rails generate uploader {uploader_name}’ (in my case, the name was guests (as in hotel guests). In your app file you’ll now find an ‘uploaders’ directory, in which you will find the uploader class that you just generated. Cool. Leave that there for now.

written in in carrierwave, coding, flatrion school, gem, rails, ruby, uploading Read on →