LoginSignup
0
0

More than 3 years have passed since last update.

【備忘録】railsチュートリアル3章のbundle installが出来ないときの対処

Posted at

【環境】
windowsPC
aws cloud9にて実行

railsチュートリアル3章のbundle install時にエラーが出て詰まったので備忘録的として記録。

【経緯】
bundle install実行時、bundle updateを促すエラーが表示されたため、指示通り実行したところ、下記のエラー表記。

An error occurred while installing pg (1.1.4), and Bundler cannot continue.
Make sure that gem install pg -v '1.1.4' --source 'https://rubygems.org/' succeeds before bundling.

【試したこと】
ググるうちにrailsチュートリアルではpgは使わないとの記述を見つけた(テキストのすぐ下にも書いていた)ため、再度bundle install --without productionを実行。しかしこちらもエラー。

bundle update --without productionと実行してみるもUnknown switches '--without'とのこと。同様の手がupdateには効かないことを学ぶ。

その後、再度bundle install --without productionを実行したところ、インストール成功。

どれがハマって成功したのかイマイチよくわかっていないものの、今後同様の状況に陥った時の対処法の一つとしたい。

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