mozyのかきおき

mozyの読書感想文や思考置き場

【Rails】Problem loading '.overcommit_gems.rb' エラー 【解決済】

vscodeのソース管理機能を使って、Gitコミットしようと思ったら、以下のようなエラーがでた。

Problem loading '.overcommit_gems.rb': Could not find parallel-1.11.2 in any of the sources

試しに、同じようにターミナルでコミットしてみたら、以下のようにエラーメッセージで解決策を指摘してくれた。

Problem loading '.overcommit_gems.rb': Could not find parallel-1.11.2 in any of the sources
Try running:
bundle install --gemfile=.overcommit_gems.rb

エラーメッセージの通り、
$ bundle install --gemfile=.overcommit_gems.rb
で解決した。やったね。

$ bundle install --gemfile=.overcommit_gems.rb
Fetching gem metadata from https://rubygems.org/...........
Using rake 12.0.0
Using ast 2.3.0
Using bundler 1.16.1
Using ffi 1.9.18
Using childprocess 0.6.3
Using iniparse 1.4.3
Using overcommit 0.39.1
Fetching parallel 1.11.2
Installing parallel 1.11.2
Using parser 2.4.0.0
Using powerpack 0.1.1
Using rainbow 2.2.2
Using ruby-progressbar 1.8.1
Using unicode-display_width 1.2.1
Fetching rubocop 0.49.1
Installing rubocop 0.49.1
Using sass 3.4.24
Fetching scss_lint 0.53.0
Installing scss_lint 0.53.0
Bundle complete! 4 Gemfile dependencies, 16 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.