0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

In Gemfile: mysql2 エラーへの対応。

Last updated at Posted at 2020-08-31

エラー全体

/private/var/folders/xt/149l2dks7ns2rz9j6ytm7m8c0000gn/T/bundler20200804-35301-1kchfhimysql2-0.5.3/gems/mysql2-0.5.3/ext/mysql2
make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
compiling statement.c
linking shared-object mysql2/mysql2.bundle
ld: warning: directory not found for option
'-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.Internal.sdk/usr/local/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mysql2.bundle] Error 1
make failed, exit code 2
Gem files will remain installed in
/var/folders/xt/149l2dks7ns2rz9j6ytm7m8c0000gn/T/bundler20200804-35301-1kchfhimysql2-0.5.3/gems/mysql2-0.5.3
for inspection.
Results logged to
/var/folders/xt/149l2dks7ns2rz9j6ytm7m8c0000gn/T/bundler20200804-35301-1kchfhimysql2-0.5.3/extensions/universal-darwin-19/2.6.0/mysql2-0.5.3/gem_make.out
An error occurred while installing mysql2 (0.5.3), and Bundler cannot
continue.
Make sure that gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'
succeeds before bundling.
In Gemfile:
mysql2

エラーの箇所

An error occurred while installing mysql2 (0.5.3), and Bundler cannot
continue.

解決方法

Gemfileの記載内容を変更

変更前

gem 'mysql2'

変更後

gem 'mysql2', '~>0.5.3'

参考記事

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?