LoginSignup
1
0

More than 1 year has passed since last update.

rake aborted! Gem::LoadError: You have already activated rake 13.0.3, but your Gemfile requires rake 12.3.3. の対処法

Last updated at Posted at 2020-12-28

事象

rails にてルーティングを調べようとrake routes を実行したら以下のエラーが出ました。

rake routes
rake aborted!
Gem::LoadError: You have already activated rake 13.0.3, but your Gemfile requires rake 12.3.3. 
Prepending `bundle exec` to your command may solve this.

うーん。なんだこれは。。。調べてみるとどうやらrake routesの前にbundle execを付ければ良いみたいです。

対処方法

bundle exec rake routes

bundle exec を加えて再度やってみたら成功しました。
bundle execは、bundlerでインストールされたgemパッケージを使用してコマンドを実行します。bundlerとはプロジェクト内で使うGemのパッケージ管理ツールのことです。

参考

以下の記事を参考にさせていただいております。

1
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
1
0