rails new ~を実行した際、以下のエラーが出てしまいます
Installing
1Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 2 3current directory: 4c:/railsruby/test1_app/vendor/bundle/gems/sqlite3-1.4.1/ext/sqlite3 5C:/Ruby25-x64/bin/ruby.exe -r ./siteconf20190823-5556-1kbpw6e.rb extconf.rb 6*** extconf.rb failed *** 7Could not create Makefile due to some reason, probably lack of necessary 8libraries and/or headers. Check the mkmf.log file for more details. You may 9need configuration options. 10 11Provided configuration options: 12 --with-opt-dir 13 --without-opt-dir 14 --with-opt-include 15 --without-opt-include=${opt-dir}/include 16 --with-opt-lib 17 --without-opt-lib=${opt-dir}/lib 18 --with-make-prog 19 --without-make-prog 20 --srcdir=. 21 --curdir 22 --ruby=C:/Ruby25-x64/bin/$(RUBY_BASE_NAME) 23 --with-sqlcipher 24 --without-sqlcipher 25 --with-sqlite3-config 26 --without-sqlite3-config 27 --with-pkg-config 28 --without-pkg-config 29C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to 30generate an executable file. (RuntimeError) 31You have to install development tools first. 32 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:541:in `try_link0' 33 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:559:in `try_link' 34 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:661:in `try_ldflags' 35 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:1821:in `pkg_config' 36 from extconf.rb:35:in `<main>' 37 38To see why this extension failed to compile, please check the mkmf.log which can 39be found here: 40 41c:/railsruby/test1_app/vendor/bundle/extensions/x64-mingw32/2.5.0/sqlite3-1.4.1/mkmf.log 42 43extconf failed, exit code 1 44 45Gem files will remain installed in 46c:/railsruby/test1_app/vendor/bundle/gems/sqlite3-1.4.1 for inspection. 47Results logged to 48c:/railsruby/test1_app/vendor/bundle/extensions/x64-mingw32/2.5.0/sqlite3-1.4.1/gem_make.out 49 50An error occurred while installing sqlite3 (1.4.1), and Bundler cannot continue. 51Make sure that `gem install sqlite3 -v '1.4.1' --source 'https://rubygems.org/'` 52succeeds before bundling. 53 54In Gemfile: 55 sqlite3 56 run bundle binstubs bundler 57Could not find gem 'sqlite3 (~> 1.4) x64-mingw32' in any of the gem sources 58listed in your Gemfile. 59 rails webpacker:install 60Could not find gem 'sqlite3 (~> 1.4) x64-mingw32' in any of the gem sources listed in your Gemfile. 61Run `bundle install` to install missing gems.
エラーに従って、
sqlite3のインストールを実行すると、
c:\railsruby>gem
1Temporarily enhancing PATH for MSYS/MINGW... 2Installing required msys2 packages: mingw-w64-x86_64-sqlite3 3警告: mingw-w64-x86_64-sqlite3-3.29.0-2 は最新です -- スキップ 4Building native extensions. This could take a while... 5ERROR: Error installing sqlite3: 6 ERROR: Failed to build gem native extension. 7 8 current directory: C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.1/ext/sqlite3 9C:/Ruby25-x64/bin/ruby.exe -r ./siteconf20190823-7920-1veyfxm.rb extconf.rb 10*** extconf.rb failed *** 11Could not create Makefile due to some reason, probably lack of necessary 12libraries and/or headers. Check the mkmf.log file for more details. You may 13need configuration options. 14 15Provided configuration options: 16 --with-opt-dir 17 --without-opt-dir 18 --with-opt-include 19 --without-opt-include=${opt-dir}/include 20 --with-opt-lib 21 --without-opt-lib=${opt-dir}/lib 22 --with-make-prog 23 --without-make-prog 24 --srcdir=. 25 --curdir 26 --ruby=C:/Ruby25-x64/bin/$(RUBY_BASE_NAME) 27 --with-sqlcipher 28 --without-sqlcipher 29 --with-sqlite3-config 30 --without-sqlite3-config 31 --with-pkg-config 32 --without-pkg-config 33C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 34You have to install development tools first. 35 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:541:in `try_link0' 36 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:559:in `try_link' 37 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:661:in `try_ldflags' 38 from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:1821:in `pkg_config' 39 from extconf.rb:35:in `<main>' 40 41To see why this extension failed to compile, please check the mkmf.log which can be found here: 42 43 C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/sqlite3-1.4.1/mkmf.log 44 45extconf failed, exit code 1 46 47Gem files will remain installed in C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.1 for inspection. 48Results logged to C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/sqlite3-1.4.1/gem_make.out
と表示されます。
bundle installもエラーにより完了できません。
どうすればいいでしょうか?
初学者のため質問が拙くて恐縮ですがよろしくお願いします。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/23 17:17
2019/08/23 17:48
2019/08/23 17:59
2019/08/24 07:48