0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DEPRECATION WARNING: `rails/console/app` has been deprecated and will be removed in Rails 8.0. `rails/console/helpers` has been deprecated and will be removed in Rails 8.0.

Last updated at Posted at 2024-10-21

tltr

原因はダウンロード済gemのバージョンが古いことで、解消法はgemアップデートです。

gemアップデートでアプリに影響を与えないように、以下コマンドでgemを一つずつアップデートして、該当warningが出なくなるまで古いgemを特定して、特定ができたら該当gemだけアップデートすれば、warningを解消できます。

bundle update gemの名前

gem全体が更新されても挙動変化の心配がない場合の解消法は以下です。

bundle update

背景

Rails ver up 7.1 to 7.2のときに以下warningが出ました。

DEPRECATION WARNING: `rails/console/app` has been deprecated and will be removed in Rails 8.0.
Please require `rails/console/methods` instead.
 (called from <main> at /Users/yuhaogao/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.2.1.1/lib/rails/console/app.rb:3)

DEPRECATION WARNING: `rails/console/helpers` has been deprecated and will be removed in Rails 8.0.
Please require `rails/console/methods` instead.
 (called from <main> at /Users/yuhaogao/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/railties-7.2.1.1/lib/rails/console/helpers.rb:3)

原因は一部のgemが古いことで、bundle updateで解消できました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?