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
11
votes
1 answer

Showing images with carrierwave in rails 3.1 in a private store folder

I have a rails 3.1 app and I am adding carrierwave to store images. But I want to store those images outside the public folde,r because they should only be accessible when users are loaded in the app. So I changed the store_dir in carrerwave with…
reves
  • 125
  • 1
  • 9
11
votes
1 answer

Carrierwave & Amazon S3 file downloading/uploading

I have a rails 3 app with an UploadsUploader and a Resource model on which this is mounted. I recently switched to using s3 storage and this has broken my ability to download files using the send_to method. I can enable downloading using the…
technix
  • 409
  • 1
  • 6
  • 12
11
votes
1 answer

How do you reprocess different versions of an image in Carriewave?

I created 3 versions of my Avatar: process :resize_to_limit => [400, 400] version :big_thumb do process :resize_to_limit => [80, 80] end version :small_thumb do process :resize_to_limit => [50, 50] end I wrote a crop…
Jonathan Chiu
  • 1,637
  • 2
  • 16
  • 25
11
votes
4 answers

missing required option :name

I am trying to set up AWS, and carrierwave to upload pictures from my website. I keep getting the error 'missing required option :name' when I try to upload/update the posts though. I have followed tutorials to set up my S3 account and to get…
Steph Simpson
  • 111
  • 1
  • 4
11
votes
2 answers

How to remove EXIF (camera) data from image with carrierwave?

Does anybody know? With paperclip there was a special config command. Removing camera data from image keeps 25-30 Kb per file. It's very sensitive if we make a lot of versions (thumb, small...). In small images the actual size of file without this…
Voldy
  • 12,829
  • 8
  • 51
  • 67
11
votes
3 answers

In Carrierwave how to create a version only when needed? Not when uploading

I have setup an uploader to upload a bunch of photos to an album. Then I let the user to select 4 images for the album cover. After they select it, I need to generate a smaller version of the photos. Only the selected 4. How can I do this? Basically…
THpubs
  • 7,804
  • 16
  • 68
  • 143
11
votes
4 answers

I would like to stop carrierwave deleting a file

I would like to set up a particular uploader so that when the related model object is destroyed the file on amazon s3 is not removed. The reason for this is that my Upload model record although destroyed is still referenced within a second audit…
nodrog
  • 3,532
  • 2
  • 25
  • 31
11
votes
1 answer

Testing Carrierwave file uploads to s3 with Capybara and Rspec

I've implemented carrierwave file uploads to Amazon s3 just like in this Railscast. I'm having trouble testing this though. I can attach a file with Capybara, but when I click the button to upload it doesn't redirect to the correct action. I…
Lee McAlilly
  • 9,084
  • 12
  • 60
  • 94
11
votes
1 answer

How can I reorganize an existing folder hierarchy with CarrierWave?

I am trying to move files around my S3 bucket using CarrierWave to reorganize the folder structure. I came to an existing Rails application where all images for a class are being uploaded into a folder called /uploads. This is causing problems…
Omar
  • 243
  • 3
  • 10
11
votes
1 answer

Loss of PNG image quality following CarrierWave::RMagick resize_to_fit

I'm using CarrierWave::RMagick to create thumbnail versions of images for a Rails app, and I've noticed loss of quality when the images are downsized. This is understandable to a certain extent, as we have less pixels in a downsized image and…
Merott
  • 7,189
  • 6
  • 40
  • 52
10
votes
2 answers

carrierwave + mini_magick gems = not an image error

I'm using: - carrierwave 0.6.0 - rails 3.2.1 - mini_magick 3.4 - ruby 1.9.2p290 And during image uploading I want to resize uploading pic: (image_uploader.rb) process :resize_to_fit => [200, 200] But after image uploading I've got an error: 1…
lukaszkups
  • 5,790
  • 9
  • 47
  • 85
10
votes
1 answer

Carrierwave add a watermark to processed images

Im trying to add a watermark to processed images with below code I got from several resources: def watermark manipulate! do |img| logo = Magick::Image.read("#{Rails.root}/assets/images/watermarks/watermark.png").first img =…
10
votes
4 answers

Rails 3. getting Errno::EACCES Permission Denied when uploading files on production

The app works fine in development but in production I get Errno::EACCES Permission Denied error when I try to upload a file using Carrierwave. I'm sure it has something to do with permissions. How can I set the permissions to allow file…
leonel
  • 10,106
  • 21
  • 85
  • 129
10
votes
5 answers

Carrierwave: Can't resolve image into URL: undefined method `to_model'

I am receiving this error: Can't resolve image into URL: undefined method `to_model' for # Did you mean? to_xml I am using carrierwave rails and when I check my form looks like this: <% @portfolios.each do…
user8492975
10
votes
1 answer

How to stub download from remote url in Carrierwave

I have a User AR model and when I save a User instance with a populated value of remote_avatar_url, Carrierwave automatically downloads the avatar. More info about this feature here. Now, in my tests, I want to stub this behavior. I know I can…
Alexander Popov
  • 23,073
  • 19
  • 91
  • 130