cloudinary / cloudinary_gem

Cloudinary GEM for Ruby on Rails integration
https://cloudinary.com
420 stars 285 forks source link

Cannot view an image using the cl_image_tag after a new upload, getting key not found: :type error #552

Closed ggupta78 closed 3 months ago

ggupta78 commented 3 months ago

Bug report for Cloudinary Ruby SDK

Before proceeding, please update to latest version and test if the issue persists - Yes, the issue is there in the latest version - 2.1.0 and is not reproducible in the last version - 2.0.2

Describe the bug in a sentence or two.

We are able to retrieve the images using the cl_image_tag, the first time the rails server starts, however on uploading a new image breaks the retrieval of images and we see the error - key not found: :type

Issue Type (Can be multiple)

Steps to reproduce

Upload a new image and try to view it using the cl_image_tag

Error screenshots or Stack Trace (if applicable)

Screenshot 2024-05-28 at 3 54 04 PM Screenshot 2024-05-28 at 3 53 37 PM

Operating System

Environment and Libraries (fill in the version numbers)

Repository

https://github.com/ggupta78/tools-rental

tamaracloudinary commented 3 months ago

Hi @ggupta78, Please ensure that the configuration in your Ruby on Rails application is correct. The error "key not found: " typically indicates that a required key is missing.

If your configuration is set up correctly, could you please provide more information? Sharing a standalone piece of code would help us replicate and troubleshoot the issue. Thanks, Tamara

ggupta78 commented 3 months ago

Hey @tamaracloudinary,

Please check the attached github repo, the project there works fine with gem version 2.0.2. And stops working with 2.1.0.

Apart from the CLOUDINARY_URL key in the .env file, there is no other configuration that we are using.

Let me know if this helps?

Thanks, Gautam

const-cloudinary commented 3 months ago

@ggupta78 , thanks for reporting this. Fixed in version 2.1.1