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

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

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

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

Q&A

1回答

516閲覧

nokogiriエラー

rowarubchinsky

総合スコア20

Ruby on Rails 5

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

0グッド

0クリップ

投稿2018/09/24 14:48

MacBook:j_p_0902 user$ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java.
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.1
Using concurrent-ruby 1.0.5
Using i18n 1.1.0
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 5.2.1
Using builder 3.2.3
Using erubi 1.7.1
Using mini_portile2 2.3.0
Fetching nokogiri 1.8.4
Installing nokogiri 1.8.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory:
/Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.8.4/ext/nokogiri
/Users/itou_ooji/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20180924-28567-2apuwd.rb
extconf.rb --use-system-libraries
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/itou_ooji/.rbenv/versions/2.3.1/bin/$(RUBY_BASE_NAME)
--help
--clean
/Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/2.3.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/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/2.3.0/mkmf.rb:571:in block in
try_compile'
from /Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/2.3.0/mkmf.rb:522:in
with_werror' from /Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/2.3.0/mkmf.rb:571:in try_compile'
from extconf.rb:138:in nokogiri_try_compile' from extconf.rb:162:in block in add_cflags'
from /Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/2.3.0/mkmf.rb:629: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/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-16/2.3.0-static/nokogiri-1.8.4/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
/Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/nokogiri-1.8.4 for
inspection.
Results logged to
/Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-16/2.3.0-static/nokogiri-1.8.4/gem_make.out

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

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

bandleインストールが急に通らなくなりました。
助けてください。。。

ネットで落ちている方法は試したのですが一向に治りません。

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

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

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

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

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

guest

回答1

0

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log

日本語訳:
何らかの理由でMakefileの作成が出来なかった。多分、必要なライブラリ、ヘッダの不足。
(訳注:何が不足しているのかを知るために)mkmf.log をチェックしなさい。

投稿2018/09/24 15:13

otn

総合スコア84380

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

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

rowarubchinsky

2018/09/26 03:40

初歩的な質問なのかもしれませんが、 mkmf.log はどこに存在していますか?
otn

2018/09/26 03:50

/Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/ の下のどこか。 find /Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/ -name mkmf.log で。
rowarubchinsky

2018/09/26 04:03

find /Users/itou_ooji/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/ -name mkmf.log コマンドを打って何かが、出力されたのですがそれが何かもわかっていない状態です。 初歩的な質問ですいません。。。
otn

2018/09/26 04:07

それがファイル名です。
rowarubchinsky

2018/09/26 05:19

10個ほど列挙されているのですが、 これら全てですか?
rowarubchinsky

2018/09/26 05:23

すいません。なんとか、確認できました。 "clang -o conftest -I/Users/itou_ooji/.rbenv/versions/2.3.1/include/ruby-2.3.0/x86_64-darwin16 -I/Users/itou_ooji/.rbenv/versions/2.3.1/include/ruby-2.3.0/ruby/backward -I/Users/itou_ooji/.rbenv/versions/2.3.1/include/ruby-2.3.0 -I. -I/Users/itou_ooji/.rbenv/versions/2.3.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/Users/itou_ooji/.rbenv/versions/2.3.1/lib -L. -L/Users/itou_ooji/.rbenv/versions/2.3.1/lib -fstack-protector -L/usr/local/lib -lruby-static -framework CoreFoundation -lpthread -ldl -lobjc " xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return 0; 6: } /* end */ と記述があるのですが、Google翻訳にかけてもわかりませんでした。 ここから何かわかるのでしょうか?
otn

2018/09/26 05:26

xcrun: error: invalid active developer path でググってください。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

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

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

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

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

ただいまの回答率
85.51%

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

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

質問する

関連した質問