Help us understand the problem. What is going on with this article?

gem sqlite3がインストールできなかった。

More than 1 year has passed since last update.

os情報

Mac Mojava

bundle install しよっと

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

じゃあ gem install sqlite3 -v '1.3.13' --source 'https://rubygems.org/' を実施しよ

ERROR:  Error installing sqlite3:
    ERROR: Failed to build gem native extension.

    current directory: /Users/#{ユーザー名}/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/sqlite3-1.3.13/ext/sqlite3
/Users/#{ユーザー名}/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20181125-2414-1pdp28o.rb extconf.rb

*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /Users/#{ユーザー名}/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-17/2.4.0-static/sqlite3-1.3.13/mkmf.log

じゃあログ見ます・・・

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun     at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • デベロッパーの権限がない?

以下を実行します!

xcode-select --install

再度実行

bundle install

Fetching sqlite3 1.3.13
Installing sqlite3 1.3.13 with native extensions
Bundle complete! 5 Gemfile dependencies, 18 gems now installed.
Bundled gems are installed into `./vendor/bundle`

めでたしめでたし!

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away