Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rails 6.0 DEPRECATION WARNING: Initialization autoloaded the constant BadgeLabelHelper. #151

Open
nicbet opened this issue Oct 15, 2019 · 1 comment

Comments

@nicbet
Copy link

nicbet commented Oct 15, 2019

With Rails 6.0.0, running rails test issues the following deprecation warning when resque-web gem is included:

DEPRECATION WARNING: Initialization autoloaded the constant BadgeLabelHelper.

Being able to do this is deprecated. Autoloading during initialization is going
to be an error condition in future versions of Rails.

Reloading does not reboot the application, and therefore code executed during
initialization does not run again. So, if you reload BadgeLabelHelper, for example,
the expected changes won't be reflected in that stale Module object.

This autoloaded constant has been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.
@chalofa
Copy link

chalofa commented Nov 28, 2019

DEPRECATION WARNING: Initialization autoloaded the constant BadgeLabelHelper.

I had a similar deprecation warning, but when adding the resque-scheduler-web gem...

after several try an errors, looks like only way to "fix" it is:

# Gemfile

# add `require: false` to avoid deprecation warnings:
gem 'resque-scheduler-web', require: false

then, require it in my initializer:

# config/initializers/resque.rb

require 'resque/scheduler/server'

@nicbet wondering if a similar approach works for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants