LoginSignup
1
0

More than 5 years have passed since last update.

rake db:migrate rake aborted! Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 12.2.1. Prepending `bundle exec` to your command may solve this.

Posted at

エラーの内容

rake db:migrate rake aborted! Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 12.2.1. Prepending bundle exec to your command may solve this.

エラーの原因
自分の PCrake 12.0.0となっているが、入れたgemfilerake 12.2.1.となっている。バージョンが違うためにエラーが出ている。

解決1

エラーが表示しているとおり、 bundle exec rake db:migrate とやる。

解決法

 バーションを修正する。

まずターミナルにgem install rakeと打つ。

gem install rake
Fetching: rake-12.2.1.gem (100%)
Successfully installed rake-12.2.1
Parsing documentation for rake-12.2.1
Installing ri documentation for rake-12.2.1
Done installing documentation for rake after 1 seconds
1 gem installed

次にrake --version と打つ。

rake --version
rake, version 12.2.1

そうすると修正された

参考文献

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