Questions tagged [carrierwave]

A modern ruby gem for file uploads in Rails and other frameworks, similar to paperclip and attachment_fu

This tag should be for questions that involve the carrierwave gem.

The github repository for carrierwave https://github.com/jnicklas/carrierwave has all of the important information about the gem.

An excellent Railscast on carrierwave: http://railscasts.com/episodes/253-carrierwave-file-uploads.

The ASCIICasts version is at http://asciicasts.com/episodes/253-carrierwave-file-uploads

A GoRails screencast is at https://gorails.com/episodes/file-uploading-with-carrierwave.

3028 questions
13
votes
4 answers

Carrierwave, Rails 4, and Multiple Uploads

I have been banging my head against the wall trying to get Carrierwave, Rails 4, and Multiple Uploads all working together. I can get a single file upload working just fine as in this and many other projects. This is not a nested situation - just…
kelleysislander
  • 131
  • 1
  • 5
13
votes
3 answers

Carrierwave Error Msg: Failed to manipulate with MiniMagick, maybe it is not an image?

I am upgrading my app to Rails 3.2 on Ruby 1.9. I had to drop attachment_fu. Carrierwave seemed the obvious replacement. At this stage I am uploading files to the file system (no cloud files, yet). I am on Lion, XCode 4.3.2, Command Line Tools…
Arta
  • 5,127
  • 5
  • 25
  • 23
12
votes
4 answers

Setting Custom error message with CarrierWave

I have an Image uploading application running on carrierwave which restrict user from uploading image only of desired extensions 'jpg,jpeg,png' I have put in place the validation for carrierwave in my Uploader define as def extension_white_list …
Viren
  • 5,812
  • 6
  • 45
  • 98
12
votes
3 answers

Does the Ruby on Rails CarrierWave gem work with Ajax?

For some reason using the CarrierWave gem with Ajax doesn't seem to be working for me. Am I doing something wrong? I followed the 253 CarrierWave Railscast well and it works without AJAX but in my application I need to use AJAX. Here is my…
EverTheLearner
  • 7,040
  • 16
  • 57
  • 72
12
votes
2 answers

Adding Additional Headers to Carrierwave for Amazon s3 Encryption

In short In short I want to know if I can send additional headers through a carrierwave and fog connection to Amazon s3? In depth I recently found that amazon supports Client and Server side encryption of files. more info »…
JonathanSimmons
  • 1,528
  • 1
  • 16
  • 28
12
votes
1 answer

Uploading a raw file to Rails using Carrierwave

My clients are trying to upload an image from Blackberry and Android phones. They don't like posting a)form parameters or b) multipart messages. What they would like to do is do a POST to a url with only the data from the file. Something like this…
jevy
  • 197
  • 1
  • 10
12
votes
4 answers

Carrierwave: Argument Error Nil location provided. Can't build URI for an image_tag using carrier wave Ruby on Rails

I'm getting an argument error for Nil location provided when using the image_tag. How do I make the image_tag optional where it only displays if there is a corresponding image? This is with Ruby on Rails 5. This is my current show page view:
Sachin
  • 257
  • 1
  • 3
  • 15
12
votes
3 answers

Stack level too deep when using carrierwave versions

I'm trying to use a sidekiq worker, which more or less saves a image file to database (using carrierwave). There are few files to save, which are a keyframes extracted from a video file. That's what that worker is about. My image uploader has a few…
mbajur
  • 4,406
  • 5
  • 49
  • 79
12
votes
1 answer

Turbolinks with carrierwave images as CSS background-image

I've been using turbolinks along this year but lately I'm getting this annoying bug. Images uploaded via carrierwave are loaded in the site with absolute URL's in the first request, but when you start browsing in the site via turbolinks, all…
12
votes
3 answers

rails carrierwave private files on S3 and cloudfront

I have both public and private files which I server from Amazon cloudfront, the public files work fine but now I'd like to secure some of them as private with an authenticated read. The private files have their own Uploader DocumentUploader, do the…
ere
  • 1,739
  • 3
  • 19
  • 41
12
votes
1 answer

recreate versions - carrierwave-fog-aws

I'm trying to recreate the images that I have uploaded using the following in my model... Post.all.each do |ym| ym.avatar.cache_stored_file! ym.avatar.retrieve_from_cache!(ym.avatar.cache_name) ym.avatar.recreate_versions! …
user749798
  • 5,210
  • 10
  • 51
  • 85
12
votes
2 answers

Is there a way to read a file object using Fog and CarrierWave?

I'm using CarrierWave and Fog to store attachments to an ActiveRecord model on S3. I can use them to generate the URL, but I can't seem to locate any method to actually read a file. Is this something that the Fog gem will even do, or do I need to…
RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193
12
votes
4 answers

How to create thumbnail for first pdf page with carrierwave

I'm processing thumbnail for PDF file in this way: version :thumb do process :resize_to_limit => [260, 192] process :convert => :jpg process :set_content_type end def set_content_type(*args) …
Arthur
  • 145
  • 1
  • 9
11
votes
5 answers

Really slow testing with file uploads

I just added validations for a carrierwave image to a model and now tests run really slow. How can I speed up this process? I feel like there must be a better way. I've been running without validations and used to be able to run through my rspec…
Alex Marchant
  • 2,490
  • 27
  • 49
11
votes
3 answers

Verifying a remote image is actually an image file in ruby?

I'm trying to figure out how I can verify what I'm feeding into carrierwave is actually an image. The source I'm getting my image urls from isn't giving me back all live urls. Some of the images no longer exist. Unfortunately it doesn't really…
hadees
  • 1,754
  • 2
  • 25
  • 36