0
0

More than 3 years have passed since last update.

【初心者】赤文字なんて怖くない!Railsのエラーについて考えてみる。

Last updated at Posted at 2019-11-23

勉強の忘備録に。更新していきます。

ターミナルでRubyonRailsで新しくアプリケーションを作成しようとした時、
以下のようなエラーが出ました。

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

以下のコードを書く事で解決しました。

$ gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/' -- --with-cppflags=-I/usr/local/opt/openssl/include --with-ldflags=-L/usr/local/opt/openssl/lib
$ cd ~/projects/【プロジェクトの名前】
$ bundle install

ただし先程までちゃんと作成できていたのに、
突然できなくなる原因の根源は不明です…

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