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)

Filter by
Sorted by
Tagged with
1 vote
1 answer
36 views

Mapping of filenames to paths using Ruby on Rails' paperclip

I do not know anything about Ruby on Rails, but I am involved with re-writing an application developed with it by someone else a while ago. I have access to the source code and, while I like to think ...
Ray's user avatar
  • 912
1 vote
0 answers
34 views

paperclip detect p8 files with wrong content type

I am using paperclip gem in my rails app and I added validation for content type for .p8 file but I found out that paperclip detect any p8 file with content type text/plain while I am expecting the ...
Yousif's user avatar
  • 11
0 votes
1 answer
62 views

Rails and Paperclip: Unable to upload images using Cloudfront

I have an old Rails application that uses Paperclip to interact with AWS. I am migrating over to Cloudfront due to TLS compatibility issues, but am running into issues uploading the photos. I can ...
Sara Fuerst's user avatar
  • 5,848
0 votes
0 answers
13 views

Rails 5, Paperclip GEM Upload Multiple Images In one Action

Good morning, I am running into a problem with my fails form. I have the following code in my form <%= property_fields.file_field :images, multiple: true, class: "form-control", id: "...
Asmithdev's user avatar
0 votes
0 answers
21 views

Webp image cropping in paperclip

I have a functionality like image crop in our site which is working fine for pixel format images. Now I need to add crop for webp format images. For every pixel format image that has been uploaded, we ...
vivek's user avatar
  • 1
3 votes
0 answers
85 views

Rails-7 ArgumentError Unknown key: :on. Valid keys are: :if, :unless, :prepend | mongoid-paperclip

I am a beginner I am trying to migrate Rails 4 to rails 7.0.6 for upload image i used mongoid-paperclip gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git', branch: 'master' gem 'mongoid-...
siva's user avatar
  • 31
1 vote
1 answer
18 views

Can we update existing xlsx file store in database in Ruby On Rails

We are using gem roo for reading file and paperclip for storing file in the database. We want to open a same file in local and update a single cell, after that upload/replace the same file in the ...
Vishal Pandey's user avatar
1 vote
1 answer
37 views

rails - how to specify the column to where kt-paperclip gem should calculate the checksum

I'm using the has_attached_file from paperclip gem to calculate a checksum on the file's content. By default, this calculation will be applied to the column that has the name fingerprint on it but the ...
AOS's user avatar
  • 89
1 vote
1 answer
29 views

How does Paperclip Gem use <attachment>_updated_at and what is its significance?

PaperClip Gem adds a default attribute called -> _updated_at. What is the use of _updated_at related to paperclip. Use of _updated_at in paperclip gem (ROR, ruby) References: https://github.com/...
Derial_31's user avatar
0 votes
0 answers
45 views

Paperclip: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint

I have below configurations: initializers/paperclip.rb Paperclip::Attachment.default_options[:path] = ':rails_root/public/system/attachments/:id/:basename:style.:extension' Paperclip::Attachment....
Priya's user avatar
  • 29
0 votes
0 answers
99 views

amazon s3 version paperclip The specified key does not exist

I got this error suddenly after it was working when I open some of the pdf files This XML file does not appear to have any style information associated with it. The document tree is shown below. <...
nourza's user avatar
  • 2,265
0 votes
0 answers
33 views

Webp image upload issue in paperclip gem in ruby on rails

webp images upload not supported it's giving this error message when trying to upload webp images has below avatar_2_3_webp = open(image_ur) at paperclip method "open" we are getting this ...
SRIKI R's user avatar
0 votes
0 answers
147 views

Not able to check if file exists on S3(Failed to open TCP connection to 169.254.169.254:80)

We are using paperclip gem to use S3 functionality(upload, fetch, check if file present). We are not providing AWS keys in code, we are using role-based mechanism. Things work fine on ECS-EC2 but ...
Avinash Kumar Singh's user avatar
0 votes
0 answers
28 views

Retrieve S3 URL of a file uploaded using Paperclip Rails from Node.js

I have an image uploaded to S3 bucket using paperclip gem from a rails app. Is there any way to retrieve the URL of that image from Node.js since both the app are using the shared DB? EDIT To clarify ...
Mohammedsalim Shivani's user avatar
5 votes
1 answer
2k views

undefined method `escape' for URI:Module in ruby 3

After updating my Rails application from Rails 6.0.1 to Rails 7.0.2.3 I am getting issue with the gem "paperclip", '~> 6.1.0' while using it in application is gives error: ActionView::...
vidur punj's user avatar
  • 5,207
0 votes
1 answer
72 views

Failed on Migration using Paperclip on Rails

I am trying to install Paperclip using Rails 6.1 I ran this command : rails g paperclip Model image And i got this migration : class AddAttachmentImageToExercises < ActiveRecord::Migration def ...
Jacob's user avatar
  • 29
1 vote
1 answer
95 views

File Attachment Management for Rails and Oracle Cloud - OCI Object storage

Looking for a RAILS solution for OCI Object Storage, we currently are using paperclip on AWS with S3. Paperclip is depreciated and Active storage has no documented solution for OCI Object Storage. Any ...
PsycloneCreative's user avatar
1 vote
1 answer
2k views

Paperclip gem Rails [6.1] : migration error wrong number of arguments (given 3, expected 2)

Im trying to install paperclip gem on my rails app and I had 3 problems in succession and I would like to point out to them, it may be related to the last problem : 1- I coulden't install the ...
Smaily's user avatar
  • 11
0 votes
1 answer
62 views

True Paperclip Replacement (Speficially Structure of the File System)

With Rails 6, I need to replace Paperclip, but I can't find any substitutions that actually easily replicate it. Specifically, the file structure paperclip used: :model/:attachmant_field/000/000/000/:...
Jason Logsdon's user avatar
1 vote
1 answer
533 views

Rails 6, Paperclip, S3, s3_direct_upload @attachment.save not saving after the s3_direct_upload completes

I have re-written an application called FilterTrak from an older version of Rails v4.2 to Rails v6 and I have everything working now except one part of the picture upload. The app uses Paperclip, aws-...
Scott Milella's user avatar
1 vote
0 answers
235 views

LoadError: cannot load such file -- azure

I was updated ruby and rails from 5.2 to 6.0.1 and after that, I was tried to run Rspec then get this error. LoadError: cannot load such file -- azure Also reported on GitHub here is the link: https:...
Vishal Pandey's user avatar
0 votes
1 answer
217 views

S3 save old url, change paperclip config, set new url as old

So here is the thing: currently our files, when user downloads them, have names like 897123uiojdkashdu182uiej.pdf. I need to change that to file-name.pdf. And logically I go and change paperclip.rb ...
Giasod's user avatar
  • 89
0 votes
1 answer
770 views

No implicit conversion of Nil to String Error with Paperclip

In my app I've created a view which lists all the PDFs in my S3 Bucket, and for this I am using the Paperclip Gem. However I am now receiving this error in my terminal. Error performing Courts::...
user avatar
1 vote
1 answer
47 views

Rails: Rendering video uploaded by paperclip

I am using Rails 6.1 + Ruby 3 and trying to allow users to upload videos and then watch them in app. clip.rb class Clip < ApplicationRecord belongs_to :chapter has_attached_file :video, ...
beaconhill's user avatar
0 votes
1 answer
333 views

Rails Paperclip Error after upgrading ruby from 2.3.1 to 3.0.1

Existing project is in ruby 2.3.1 and upgrading version to 3.0.1 (rails 6.1.4) with related gems. Updated gem to "paperclip" to "kt-paperclip". I am getting following error while ...
mohit chavda's user avatar
0 votes
0 answers
368 views

Rails:undefined method `url_for' for #<Aws::S3::Object

ruby:2.6.3 rails:5.2.5 I use those gems ↓ gem 'devise' gem 'paperclip' gem 'aws-sdk' I can't show the image because of an error. def authenticated_image_url(style) profile_img.s3_object(style)...
dxo's user avatar
  • 33
0 votes
1 answer
157 views

Is there a way to examine the URL used by the paperclip gem?

I am using the kreeti/kt-paperclip gem with rails 4.2 and MinIO. I believe I have setup the model correctly, but I am getting "Aws::S3::Errors::InvalidAccessKeyId: The AWS Access Key Id you ...
J Edward Ellis's user avatar
0 votes
1 answer
371 views

rails: migration issue with paperclip gem

I'm trying to migrate the rails app but it fail. the issue in the paperclip gem migration. I tried to use both way for migration but both of them not work properly: class AddAttachmentImageToItems <...
zippax's user avatar
  • 294
1 vote
0 answers
394 views

delayed_paperclip with sidekiq returning NoMethodError: undefined method `fetch' for nil:NilClass

I am using delayed_paperclip and I have tried it with the default ActiveJob and it works well. However, it runs synchronously so it will wait for the job to finish before response so I wanted to move ...
eibersji's user avatar
  • 1,208
0 votes
0 answers
100 views

I want to migrate paperclip gem to active_storage Ruby on Rails 7, Part2

I follow paperclip2active_storage. My database.yml defines a sqlite DB for environment development that is no longer needed, b/c acitve_storage uses Disk storage as follows: database.yml production: ...
Leder's user avatar
  • 396
0 votes
1 answer
402 views

I want to migrate paperclip gem to active_storage Ruby on Rails 7

...like this: paperclip2active_storage Update be sure to watch the linked video presentation as the text document does not present all the quirks! so I installed and configured rails 7 and gem '...
Leder's user avatar
  • 396
14 votes
2 answers
3k views

warning: URI.escape is obsolete when using paperclip in ruby 2.7.2

ruby - 2.7.2 rails - 6.0 paperclip - 6.1.0 I am getting following warning in my console, while using paperclip gem with ruby 2.7.2 /Users/***/.rvm/gems/ruby-2.7.2/gems/paperclip-6.1.0/lib/...
honey's user avatar
  • 1,011
2 votes
2 answers
872 views

Can no longer bundle install all of my applications on Rails that require Paperclip due to MimeMagic gem no longer existing?

I had a program that worked a few weeks ago and I wiped it out and had to re-install my ruby and rails enviornment and now I can not bundle install the same program because Paperclip requires ...
Scott Milella's user avatar
-1 votes
1 answer
165 views

error in module paperclip (python) module not found copy() in paperclip? [duplicate]

File "C:\Users\Personal\PycharmProjects\pythonTutes\paperclip.py", line 1, in <module> import paperclip File "C:\Users\Personal\PycharmProjects\pythonTutes\paperclip.py"...
harshita agrawal's user avatar
0 votes
3 answers
934 views

when I use paperclip migration error occur

run this command => rails generate paperclip photo image create migration file class AddAttachmentImageToPhotos < ActiveRecord::Migration[5.1] def self.up change_table :photos do |t| ...
rizwan ali's user avatar
0 votes
1 answer
412 views

Rails: AWS S3 Access denied error with Paperclip upload

I am getting Aws::S3::Errors::AccessDenied Access Denied whenever I tries to upload an image using paperclip and aws-sdk-s3. I have almost tried all the solution available on Internet. I have tried ...
Kashyap 's user avatar
0 votes
1 answer
33 views

adding image with paperclip failed NoHandlerError

Using Paperclip 6.1.0 in rails 6 I got this error: Paperclip::AdapterRegistry::NoHandlerError (No handler found for "logo.jpg"): In my model I have: class Movie < ApplicationRecord ...
DevFromI's user avatar
  • 273
1 vote
0 answers
737 views

Could not run the `identify` command. Please install ImageMagick

I am using Paperclip and getting this error on the deployed site, not on my local server. And that's why it is becoming more difficult for me to get out of this. A Paperclip::Errors::...
Harshita's user avatar
  • 372
0 votes
0 answers
501 views

How to change paperclip attachment path?

So, i've got a file which is processed after upload in a certain way. After that processing it should be moved to another folder. I did it with help of FileUtils.mv (since i didn't find any ...
Kaama's user avatar
  • 35
0 votes
0 answers
459 views

Paperclip upload / update: Getting can't modify frozen String: "" error on Rails 6

On Rails 6.0.3.3 and ruby 2.7.0, using kt-paperclip (~> 6.3) This is the content of my View: <%= form_for brand, url: brand_path, html: { multipart: true } do |f| %> <%= f.file_field :...
Falknn's user avatar
  • 246
1 vote
2 answers
670 views

Rails migrations complains about "add_attachment"

This is not a duplicate of: Rails migration complains about undefined method `attachment' using paperclip So we used paperclip and have now switched to activestorage but some of our old migrations ...
isethi's user avatar
  • 679
3 votes
1 answer
774 views

How can I avoid accepting broken images in ActiveStorage?

I am currently migrating a Rails application (that drives screenshots.debian.net) from Paperclip to ActiveStorage. It allows users to upload PNG images that are then shown to all users. TL;DR: The ...
Christoph Haas's user avatar
-1 votes
1 answer
411 views

TypeError: Illegal invocation at forEach when creating attachments

trying to create an attachment to the associating model, but have an error, do not know how to debug it firefox says 'forEach' called on an object that does not implement interface FormData; chrome - ...
ABA's user avatar
  • 39
0 votes
1 answer
604 views

Paperclip uploads for docx file is being downloaded as zip files?

I have checked the Mimetype of the docx file and it shows: 'application/octet-stream' But checking it without any content in it shows application/vnd.openxmlformats-officedocument.wordprocessingml....
Deepan kathir's user avatar
0 votes
2 answers
721 views

Undefined method `image' in Shrine

I try to add Shrine gem to an existing project that uses Paperclip. I added a Shrine image to a new model (just for a check). So I created model Country with this db table: create_table "...
taneko's user avatar
  • 41
0 votes
1 answer
59 views

Getting undefined method `builder_photo' for nil:NilClass error

I have a Builder profile image which is stored in Database table Builders. I want to show the current_user image that is builder profile image in the navigation bar. Sp I used. <%= image_tag(@...
user avatar
0 votes
0 answers
58 views

Paperclip error while trying to upload a file (windows)

I am new to rails and I am trying to upload a file using the Paperclip Gem but I am facing the following error. (Note I am using windows so it might be a problem with some file commands). Note I did ...
Izabayo Blaise's user avatar
1 vote
0 answers
233 views

Solidus - cannot upload or view images (ImageMagick is installed)

I'm just starting with Solidus, though I do know my way around Rails. I've created a Solidus project on my Mac, and I installed all the required gems as well as ImageMagick through Homebrew. Both ...
Michael's user avatar
  • 139
0 votes
1 answer
351 views

Imagemagic: Resizing image increase image size

I have an image And I need to create thumbnail I do it with next command convert "source.png" -auto-orient -resize "350x350>" "destination.png" But resized image has larger size then original ...
eugene_trebin's user avatar
0 votes
2 answers
465 views

how should I configure "block public access" on Amazon S3?

I am using paper clip and ruby on rails to upload images from my website to AWS S3 and my webapp is hosted on heroku. Should I checking block public access under bucket settings? Currently I have ...
stackedodds's user avatar

1
2 3 4 5
86