From: yamataka@...08.itscom.net Date: 2017-12-12T16:19:40+09:00 Subject: [ruby-list:50619] [質問] gem install Chromecast, dnssd エラー対応 山口と申します。 c:\yama\bin\UPnP>ruby --version ruby 2.4.1p111 (2017-03-22 revision 58053) [x64-mingw32] の環境で、Ruby で、Chromecast 制御ができればと思い、 https://github.com/robzon/chromecast-ruby の gem をInstall してみたので すが、下記のエラーが出ます。 c:\yama\bin\UPnP>gem install chromecast -p http://proxy.foo.bar.co.jp:10080 Fetching: ffi-1.9.18-x64-mingw32.gem (100%) Successfully installed ffi-1.9.18-x64-mingw32 Fetching: ffi-compiler-1.0.1.gem (100%) Successfully installed ffi-compiler-1.0.1 Fetching: ruby-tls-1.0.3.gem (100%) Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing chromecast: ERROR: Failed to build gem native extension. current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ruby-tls-1. 0.3/ext C:/Ruby24-x64/bin/ruby.exe -rubygems C:/Ruby24-x64/lib/ruby/gems/2.4.0/ gems/rake-12.0.0/exe/rake RUBYARCHDIR=C:/Ruby24-x64/lib/ruby/gems/2.4.0/ extensions/x64-mingw32/2.4.0/ruby-tls -1.0.3 RUBYLIBDIR=C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64- mingw32/2.4.0/ruby-tls-1.0.3 rake aborted! TypeError: no implicit conversion of nil into String (See full trace by running task with --trace) rake failed, exit code 1 Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/ gems/ruby-tls-1.0.3 for inspection. Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64- mingw32/2.4.0/ruby-tls-1.0.3/gem_make.out 解決方法をご教示いただけないでしょうか? この、gem 正常にInstall できないので... 同様に、Chromecast 制御ができそうな、 https://github.com/Raven24/rbcast/blob/master/examples/console_remote.rb の gem を使おうとしたところ、 c:\temp\rbcast\examples>.\console_remote.rb C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in ` require': cannot load such file -- dnssd (LoadError) from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_ require.rb:55:in `require' from C:/temp/rbcast/examples/console_remote.rb:26:in `
' となるので、 gem install dnssd すると、下記のエラーメッセージが出て、対処方法が分からず... こちらの解決方法も併せて、ご教示いただけないでしょうか? c:\temp\rbcast\examples>gem install dnssd Fetching: dnssd-3.0.1.gem (100%) Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing dnssd: ERROR: Failed to build gem native extension. current directory: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/dnssd-3.0. 1/ext/dnssd C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20171212-6596-w5cecw.rb extconf. rb checking for dns_sd.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=C:/Ruby24-x64/bin/$(RUBY_BASE_NAME) --with-warnings --without-warnings --with-dnssd-dir --without-dnssd-dir --with-dnssd-include --without-dnssd-include=${dnssd-dir}/include --with-dnssd-lib --without-dnssd-lib=${dnssd-dir}/lib C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:457:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:588:in `try_cpp' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:1095:in `block in have _header' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:321:in `open' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:321:in `open' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:347:in `postpone' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for' from C:/Ruby24-x64/lib/ruby/2.4.0/mkmf.rb:1094:in `have_header' from extconf.rb:7:in `
' To see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/dnssd-3. 0.1/mkmf.log extconf failed, exit code 1 Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/ gems/dnssd-3.0.1 for inspection. Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64- mingw32/2.4.0/dnssd-3.0.1/gem_make.out