この質問の一つ前のエラーを解消するためにいろいろ調査していて、rubyを再インストールしようと思いアンインストール(ruby 2.5.3)→インストール(ruby 2.5.3)時にこけました。
そもそもの発端は
railsにunicornを入れたい
↓
エラー!(この時の状況は前回の質問に書いてます)
↓
いろいろやってみる
↓
ダメ
↓
じゃあunicornをgemから消してとりあえず戻そう(このときgitから変更履歴を辿って前のバージョンに戻す)
↓
bundle update
↓
Fetching nio4r 2.4.0 (was 2.3.1) Installing nio4r 2.4.0 (was 2.3.1) with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/xxxxx/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nio4r-2.4.0/ext/nio4r /Users/xxxxx/.rbenv/versions/2.5.3/bin/ruby -r ./siteconf20190724-43411-vgqdt9.rb extconf.rb checking for unistd.h... yes checking for sys/select.h... yes checking for port_event_t in poll.h... no checking for sys/epoll.h... no checking for sys/event.h... yes checking for sys/queue.h... yes checking for port_event_t in port.h... no checking for sys/resource.h... yes creating Makefile current directory: /Users/xxxxx/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nio4r-2.4.0/ext/nio4r make "DESTDIR=" clean make: error: unable to find utility "make", not a developer tool or in PATH current directory: /Users/xxxxx/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nio4r-2.4.0/ext/nio4r make "DESTDIR=" make: error: unable to find utility "make", not a developer tool or in PATH make failed, exit code 72 Gem files will remain installed in /Users/xxxxx/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/nio4r-2.4.0 for inspection. Results logged to /Users/xxxxx/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/nio4r-2.4.0/gem_make.out An error occurred while installing nio4r (2.4.0), and Bundler cannot continue. Make sure that `gem install nio4r -v '2.4.0' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: rails was resolved to 5.1.7, which depends on actioncable was resolved to 5.1.7, which depends on nio4r
↓
なんで...?
↓
(いろいろ調べる)
↓
rbenvで現在のrubyをアンインストール
↓
rbenvで再インストール
↓
$ rbenv install 2.5.3 ruby-build: use openssl from homebrew Downloading ruby-2.5.3.tar.bz2... -> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.3.tar.bz2 Installing ruby-2.5.3... BUILD FAILED (OS X 10.14.5 using ruby-build 20181207) Inspect or clean up the working tree at /var/folders/6v/rr3ykmf51cl8_4vxy_ssbp340000gn/T/ruby-build.20190724220108.28652 Results logged to /var/folders/6v/rr3ykmf51cl8_4vxy_ssbp340000gn/T/ruby-build.20190724220108.28652.log Last 10 log lines: checking for setjmp type... _setjmp checking for prefix of external symbols... nm: error: unable to find utility "nm", not a developer tool or in PATH NONE checking pthread.h usability... yes checking pthread.h presence... yes checking for pthread.h... yes checking if make is GNU make... make: error: unable to find utility "make", not a developer tool or in PATH no checking for safe null command for make... configure: error: no candidate for safe null command make: error: unable to find utility "make", not a developer tool or in PATH
↓
...
時系列的にはこんな感じになります。
この"make"てなんなんでしょうか...
unicornがいれられない時もでていたエラーなんです...
xcode-select --installはしましたXcodeも入っています...
とにかくrubyが入れられないと何もできないので、たすけてください。
よろしくお願いします。
====== 追記 ======
下記URLを参考に
https://qiita.com/marusho_summers/items/1022d5bbfd2f7856d2f8
echo 'export CC=/usr/bin/gcc' >> ~/.bash_profile source ~./bash_profile
したところ
エラーの内容が
checking for ruby... /Users/shirafujitakuya/.rbenv/shims/ruby checking build system type... x86_64-apple-darwin18.6.0 checking host system type... x86_64-apple-darwin18.6.0 checking target system type... x86_64-apple-darwin18.6.0 gcc: error: unable to find utility "gcc", not a developer tool or in PATH configure: error: clang version 3.0 or later is required make: error: unable to find utility "make", not a developer tool or in PATH
こうなりました...
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。