Ruby on Rails の環境構築中です。
コマンド実行後の表示
PS D:\> gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. current directory: D:/Ruby24/lib/ruby/gems/2.4.0/gems/nio4r-2.1.0/ext/nio4r D:/Ruby24/bin/ruby.exe -r ./siteconf20171202-2224-14odtlm.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=D:/Ruby24/bin/$(RUBY_BASE_NAME) D:/Ruby24/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 D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:588:in `try_cpp' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:1095:in `block in have_header' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:945:in `block in checking_for' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:321:in `open' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:321:in `open' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:347:in `postpone' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:944:in `checking_for' from D:/Ruby24/lib/ruby/2.4.0/mkmf.rb:1094:in `have_header' from extconf.rb:5:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: D:/Ruby24/lib/ruby/gems/2.4.0/extensions/x86-mingw32/2.4.0/nio4r-2.1.0/mkmf.log extconf failed, exit code 1 Gem files will remain installed in D:/Ruby24/lib/ruby/gems/2.4.0/gems/nio4r-2.1.0 for inspection. Results logged to D:/Ruby24/lib/ruby/gems/2.4.0/extensions/x86-mingw32/2.4.0/nio4r-2.1.0/gem_make.out ### mkmf.log
"i686-w64-mingw32-gcc -o conftest.exe -ID:/Ruby24/include/ruby-2.4.0/i386-mingw32 -ID:/Ruby24/include/ruby-2.4.0/ruby/backward -ID:/Ruby24/include/ruby-2.4.0 -I. -D_FORTIFY_SOURCE=2 -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -march=i686 -mtune=generic -O2 -pipe conftest.c -L. -LD:/Ruby24/lib -L. -pipe -lmsvcrt-ruby240 -lgmp -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi " checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include <winsock2.h> 4: #include <windows.h> 5: int main(int argc, char **argv) 6: { 7: return 0; 8: } /* end */
ruby -v
ruby 2.4.2p198 (2017-09-14 revision 59899) [i386-mingw32]
gem -v
2.7.3
色々調べてはみていますが、どうも決定打にかけ解決ができない状態です。
どうか知恵をお貸し願います。
railsをインストールしようとしている環境(OS)は何でしょうか?
OSはwindows10を使用しています!
回答1件
あなたの回答
tips
プレビュー