cloudinary / cloudinary_gem

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

The gem breaks the lazy loading of ActionView::Base #533

Closed maximerety closed 5 months ago

maximerety commented 7 months ago

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)

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

Environment and Libraries (fill in the version numbers)

Repository

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

const-cloudinary commented 5 months ago

Fixed in #532