cloudinary_gem icon indicating copy to clipboard operation
cloudinary_gem copied to clipboard

The gem breaks the lazy loading of ActionView::Base

Open maximerety opened this issue 1 year ago • 0 comments

Bug report for Cloudinary Ruby SDK

Describe the bug in a sentence or two.

When the gem is loaded in a Rails application, it breaks the lazy loading of ActionView::Base.

Issue Type (Can be multiple)

  • [ ] Build - Cannot install or import the SDK
  • [ ] Performance - Performance issues
  • [ ] Behaviour - Functions are not working as expected (such as generate URL)
  • [ ] Documentation - Inconsistency between the docs and behaviour
  • [x] Other - Triggers an undesired side-effect in the loading of a Rails application

Steps to reproduce

Create a fresh Rails app in a shell, and add the cloudinary gem to the Gemfile:

rails new cloudinary-issue && cd cloudinary-issue

cat <<RUBY >> Gemfile
gem 'cloudinary'
RUBY

bundle install

Then open a rails console (bin/rails console) and check if the lazy loading of ActionView::Base is preserved or not:

ActionView.autoload?(:Base)
# => "action_view/base" => means that the lazy loading is preserved => success
# => nil                => means that the class is already loaded   => failure

Error screenshots or Stack Trace (if applicable)

Operating System

  • [ ] Linux
  • [ ] Windows
  • [ ] macOS
  • [x] All

Environment and Libraries (fill in the version numbers)

  • Cloudinary Ruby SDK version - Any, including latest: 1.28.0
  • Ruby Version - Any
  • Rails Version - Any
  • Other Libraries (Carrierwave, ActiveStorage, etc) - 0.0.0

Repository

If possible, please provide a link to a reproducible repository that showcases the problem

maximerety avatar Jan 18 '24 14:01 maximerety