kpumuk / meta-tags

Search Engine Optimization (SEO) for Ruby on Rails applications.
MIT License
2.73k stars 275 forks source link

Rails 6.0.0 Deprecation Warning #206

Closed millsaj closed 5 years ago

millsaj commented 5 years ago

Issue

I am experiencing the following deprecation warning on a rails 6.0.0 default install.

DEPRECATION WARNING: Initialization autoloaded the constants ActionText::ContentHelper and ActionText::TagHelper.

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 ActionText::ContentHelper, for example,
the expected changes won't be reflected in that stale Module object.

These autoloaded constants have been unloaded.

Please, check the "Autoloading and Reloading Constants" guide for solutions.
 (called from <main> at /data/local/work/theday/testapp/config/environment.rb:5)

Steps to reproduce

Ruby version: ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-linux] Rails version: Rails 6.0.0

rails new testapp
cd testapp
echo "gem 'meta-tags'" >> Gemfile
bundle install
echo "exit" | bundle exec rails c
cat log/development.log
millsaj commented 5 years ago

I imagine the problem is when you require 'action_controller' in meta_tags.rb.

authlogic had a similar problem and it looks like the same fix might work here. See this PR.

kpumuk commented 5 years ago

~Hey @millsaj . Is there an easy way for you to check if #207 solves the warning?~

I need to learn how to read issue text from start to end. Thank you for the "steps to reproduce"