[Rails] warning: constant Gem :: ConfigMap is deprecated

Introduction

The other day, when I messed with the rbenv environment to make Rails console compatible with Japanese, I accidentally updated the version of RubyGems. Then, after upgrading the version of RubyGems, the following warning occurred and rubocop etc. did not move correctly.

/Users/hoge/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/bundler-1.16.4/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated

Solution

The solution was to update or downgrade the version of RubyGems to match the version compatible with the bundler version. Since the version of bundler was 1.16.4 this time, I changed the version of rubygems-update to 2.5.1 and ran $ gem list rubygems-update to solve it. If you update the version of bundler and there is no problem, you can solve it by updating bundler and RubyGems to the latest version.

For the version change of RubyGems, I referred to the following site. https://blog.ruedap.com/2011/02/21/ruby-gem-update-version-down

Recommended Posts

[Rails] warning: constant Gem :: ConfigMap is deprecated
What is Rails gem devise?
[Ruby on Rails] I get a warning when running RSpec because gem'chromedriver-helper' is deprecated.
[Rails 6] Rubocop warning list