Questions tagged [paperclip]

Paperclip is a library for the Ruby on Rails framework which makes dealing with file attachments easier. In addition to dealing with standalone files, the library provides convenience methods for creating image thumbnails. Paperclip is now deprecated - the authors recommend using ActiveStorage (they have provided a migration guide)

Paperclip is now deprecated. The library authors recommend switching to ActiveStorage. They have provided a migration guide as well.

Paperclip is intended as an easy file attachment library for ActiveRecord. The intent behind it was to keep setup as easy as possible and to treat files as much like other attributes as possible.

For more information:

4288 questions
1
vote
1 answer

Paperclip has cached an old setting. How do I refresh it?

I updated a thumbnail size for my Photo model. Worked great on my local, and deployed it to production. Unfortunately, even if I run reprocess on a specific Photo it still reprocesses to the old params. If I check Photo.photo.styles it returns the…
Trip
  • 26,756
  • 46
  • 158
  • 277
1
vote
1 answer

Problems updating Paperclip from plugin to gem

I am apparently having a huge problem switching from the plugin version of Paperclip to the gem version in my app. It's been my impression that there should be no difference whatsoever between a plugin and a gem of a specified version. However,…
Josh Kovach
  • 7,679
  • 3
  • 45
  • 62
1
vote
1 answer

Paperclip obtain real image size

My problem is the next: I am trying resize a image size depending a proportial size. Example If i have a image whose size is 1440*1000 its new size will be 648*440 (I use a proportion depending a max_size) NOTE: Then i post my code so you will…
maxiperez
  • 1,470
  • 2
  • 20
  • 40
1
vote
1 answer

Paperclip: Is that possible to recreate a deleted thumbnail without uploading the original image again?

I use Paperclip like this: class Asset < ActiveRecord::Base has_attached_file :asset, :styles => { :thumb => "80x80>" }, ... When an image is uploaded, a thumbnail is created successfully. Suppose, that for some reason, a thumbnail was deleted…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
1
vote
1 answer

Polymorphic Paperclip Plugin with multiple picture uploads

I have used paperclip polymorphic plugin to track my attachments. The tutorialwhich I have been through has used single attachments(image) http://burm.net/2008/10/17/ruby-on-rails-polymorphic-paperclip-plugin-tutorial/. How do i enable multiple…
1
vote
1 answer

Paperclip, phusion passenger - displaying images error

I am using paperclip to upload and display images in my rails application. Everything seems to work fine until i used phusion passenger to deploy my application on apache. In my view.html.erb, i am using the code below to display my images: <% for…
tanya
  • 2,925
  • 7
  • 32
  • 49
1
vote
2 answers

rails paperclip: uploaded file does not get stored

I am making my first steps with the Rails plugin 'paperclip' an therefor watched the RailsCast #134: http://railscasts.com/episodes/134-paperclip Did everthing the same, except that I'm running rails 3.0.9 and installed paperclip (2.3.15) via adding…
dennis
  • 51
  • 6
1
vote
1 answer

Can paperclip be used for off-site attachments

Basically, I want to import a number of URL of pictures from around the web and manage them in my app. I also let the user upload some files, and I use paperclip to manage the upload and generate thumbnails. My question is: can I use paperclip just…
joao
  • 3,517
  • 1
  • 31
  • 43
1
vote
1 answer

Updates files on Amazon S3

I have a text-file @ Amazon S3. This file needs to be appended with some text periodically. Is it possible to update the same file on Amazon-S3 or should it be a new file altogether? Am using Ruby on Rails & PaperClip.
Satya Kalluri
  • 5,148
  • 4
  • 28
  • 37
1
vote
1 answer

Paperclip Validation Failed File Name Must Be Set

Background: I'm using Rails 3.0.3, MySQL, and Ruby 1.9.2-p136. Gems relevant: gem 'rails', '3.0.3' gem 'mysql2' gem 'jquery-rails', '>= 1.0.3' gem 'client_side_validations' gem 'rails3-jquery-autocomplete' gem 'rake', '~> 0.8.7' …
Blaine
  • 11
  • 4
1
vote
0 answers

With Paperclip, how could I create a attachment object using a URL?

Basically, because Omniauth retrieves URL's of the user's profile picture for say, Facebook, I need to find a way to generate attach that URL as a file for the user.
fivetwentysix
  • 7,379
  • 9
  • 40
  • 58
1
vote
3 answers

How can you update a file in Ruby on Rails / Paperclip / S3?

My Ruby on Rails application uses S3 and Paperclip. I have users upload a text file, which works fine. I also want to allow them to edit the text file and resave it... this is where I'm confused. Since they're not re-uploading any file, but…
Geoff
  • 9,470
  • 13
  • 52
  • 67
1
vote
3 answers

Paperclip not working under Apache/Passenger

I've deployed my rails application on a staging/production machine running Apache and Phusion Passenger but cannot get the Paperclip gem to load correctly (or at least to get the piece of the application working that uses it). Other gems seem to…
Mark
  • 217
  • 1
  • 2
  • 9
1
vote
0 answers

Paperclip create images with the wrong access rights

On my production server (ubuntu), i can add images using paperclip (stored in public), and i can delete them, however when accessing those images with a browser i have a forbidden error. My ruby user is admin, if i create a file in the public folder…
Syl
  • 3,719
  • 6
  • 35
  • 59
1
vote
1 answer

undefined method "has_attached_file" with paperclip

I'm getting some unexpected behavior from my app while Upgrading to from Rails 2.3.11 to 3.1, particularly in relation to Paperclip. I've added the gem 'paperclip' to my Gemfile, and I ran bundle install and all seems to go well, except that when I…
Josh Kovach
  • 7,679
  • 3
  • 45
  • 62