質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

1回答

282閲覧

bundle install --path vendor/bundle --jobs=4のエラーが解決できない

miki.koki

総合スコア10

Ruby on Rails 5

Ruby on Rails 5は、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2018/11/25 05:43

前提・実現したいこと

bundle install --path vendor/bundle --jobs=4を実行したい

発生している問題・エラーメッセージ

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.5/ext/nokogiri

/Users/miki/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20181124-5404-x1qu27.rb extconf.rb
checking if the C compiler accepts ... *** 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.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/miki/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME)
--help
--clean
/Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:574:in block in try_compile'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:521:in with_werror' from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:574:in try_compile'
from extconf.rb:138:in nokogiri_try_compile' from extconf.rb:162:in block in add_cflags'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:632:in with_cflags' from extconf.rb:161:in add_cflags'
from extconf.rb:410:in `<main>'

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

/Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/nokogiri-1.8.5/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.8.5 for inspection.
Results logged to
/Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/nokogiri-1.8.5/gem_make.out

An error occurred while installing nokogiri (1.8.5), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.8.5' succeeds before bundling.

In Gemfile:
rails was resolved to 5.2.0, which depends on
actioncable was resolved to 5.2.0, which depends on
actionpack was resolved to 5.2.0, which depends on
actionview was resolved to 5.2.0, which depends on
rails-dom-testing was resolved to 2.0.3, which depends on
nokogiri

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/nio4r-2.3.1/ext/nio4r

/Users/miki/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20181124-5404-2zll4i.rb extconf.rb
checking for unistd.h... *** 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.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/miki/.rbenv/versions/2.5.0/bin/$(RUBY_BASE_NAME)
/Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:590:in try_cpp'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:1097:in block in have_header' from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:947:in block in checking_for'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:350:in block (2 levels) in postpone' from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:320:in open'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:350:in block in postpone' from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:320:in open'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:346:in postpone' from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:946:in checking_for'
from /Users/miki/.rbenv/versions/2.5.0/lib/ruby/2.5.0/mkmf.rb:1096:in have_header' from extconf.rb:14:in <main>'

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

/Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/nio4r-2.3.1/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/nio4r-2.3.1 for inspection.
Results logged to
/Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/nio4r-2.3.1/gem_make.out

An error occurred while installing nio4r (2.3.1), and Bundler cannot continue.
Make sure that gem install nio4r -v '2.3.1' succeeds before bundling.

In Gemfile:
rails was resolved to 5.2.0, which depends on
actioncable was resolved to 5.2.0, which depends on
nio4r

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.0/ext/websocket-driver

/Users/miki/.rbenv/versions/2.5.0/bin/ruby -r ./siteconf20181124-5404-hpgj0s.rb extconf.rb
creating Makefile

current directory: /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.0/ext/websocket-driver
make "DESTDIR=" clean
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun

current directory: /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.0/ext/websocket-driver
make "DESTDIR="
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun

make failed, exit code 1

Gem files will remain installed in /Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/gems/websocket-driver-0.7.0 for inspection.
Results logged to
/Users/miki/camp/sparta_crm7/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-15/2.5.0-static/websocket-driver-0.7.0/gem_make.out

An error occurred while installing websocket-driver (0.7.0), and Bundler cannot continue.
Make sure that gem install websocket-driver -v '0.7.0' succeeds before bundling.

In Gemfile:
rails was resolved to 5.2.0, which depends on
actioncable was resolved to 5.2.0, which depends on
websocket-driver

エラーメッセージ

該当のソースコード

ソースコード

試したこと

色々とググってみたのですがイマイチわかりません。

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

You have to install development tools first.

Command Line Toolsをインストールして下さい。

投稿2018/11/25 11:33

hichon

総合スコア5737

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

miki.koki

2018/11/25 12:07

ありがとうございます!
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問