cloudinary / cloudinary_gem

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

After upgrading to CarrierWave 1.0+, need to reload model for file not to be nil #303

Open cgriego opened 6 years ago

cgriego commented 6 years ago

After upgrading CarrierWave to 1.0.0.beta or higher, tests using Cloudinary + CarrierWave started failing because model.image.file were nil until the model was reloaded.

I think this person ran into the same issue. https://stackoverflow.com/questions/46271081/carrierwave-cloudinary-image-upload-works-but-null-values-returned-right-after-u

shirlymanor commented 6 years ago

I apologize for the very late reply. Unfortunately, it's a known bug in carriwave (there are a couple of open issues on GH). A workaround will be to reload as you mention.

bbugh commented 6 years ago

@cgriego did you make any progress with this other than forcing the model to reload? I can't find any issues in carrierwave referencing this either. Thanks!

cgriego commented 6 years ago

I still have the model reload workaround in place.

shirlymanor commented 5 years ago

Closing this issue due to the time elapsed. Please feel free to either re-open the issue, contact our support at http://support.cloudinary.com or create a new ticket if you have any additional issues.

cgriego commented 5 years ago

I can confirm this issue is not happening with carrierwave 1.3.1 and cloudinary 1.11.1.

cgriego commented 5 years ago

Sorry, yes this issue does still happen with the latest gem versions mentioned above. Please reopen.

aceunreal commented 3 years ago

Could this be re-opened?

momoip commented 3 years ago

Hi, I have raised an internal ticket and our Dev team will be looking at this issue. Thanks, Mo

david-zw-liu commented 2 years ago

Any update?

# same here

gem 'carrierwave', '~> 2.2.2'
gem 'cloudinary', '~> 1.22.0'
aleksandar-cloudinary commented 2 years ago

Hi, @david-liu-950627 - Thanks for following up on this and for creating the PR. I have added one of my colleagues as a reviewer.