LoginSignup
1
3

More than 5 years have passed since last update.

rakeでエラー You have already activated rake xx.x.x, but your Gemfile requires rake xx.x.x.での対処の仕方 備忘録その2

Last updated at Posted at 2016-11-13

ただ単純にrakeのバージョンをあげるだけで解決する場合がある

下記の様にお決まりに怒られるパターンです。
$ rake routes
rake aborted!
Gem::LoadError: You have already activated rake 11.3.0, but your Gemfile requires rake 11.2.2. Prepending bundle exec to your command may solve this.

システムではrake 11.3.0は、
しかし開発してる側のファイルではrake 11.2.2.
案外単純に解決できるかも。

$ bundle update rake
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Installing rake 11.3.0 (was 11.2.2)
ここからいくつか何をinstallしているかの一覧が出るが省略。
そして終わりにくると、

Bundle updated!
Gems in the group production were not installed.

rakeコマンドがbin/などを省略できる。

違う解決方法も記録してますので参考に。

多数で開発したり、既存のを開発する場合はオススメしない。

今回も自分用に記録しておく。
http://www.papa-programing.jp

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