https://prog-8.com/docs/rails-env-win
上記サイトにてRuby on Rails の環境構築を行ってます。
「sqlite3のgemをインストールします」までは順調にいったのですが
「gem install sqlite3 -v 1.3.13 --platform=ruby」というコードを打つと下記のような表示になりました。
これはどうすれば解決するのでしょうか?
Fetching: sqlite3-1.3.13.gem (100%) Temporarily enhancing PATH for MSYS/MINGW... Building native extensions. This could take a while... ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension. current directory: C:/Ruby24/lib/ruby/gems/2.4.0/gems/sqlite3-1.3.13/ext/sqlite3 C:/Ruby24/bin/ruby.exe -r ./siteconf20190623-10868-bta5xh.rb extconf.rb checking for sqlite3.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/bin/$(RUBY_BASE_NAME) --with-sqlite3-config --without-sqlite3-config --with-pkg-config --without-pkg-config --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib C:/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 C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:588:in `try_cpp' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:1149:in `block in find_header' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:946:in `block in checking_for' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:351:in `block (2 levels) in postpone' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:321:in `open' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:351:in `block in postpone' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:321:in `open' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:347:in `postpone' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:945:in `checking_for' from C:/Ruby24/lib/ruby/2.4.0/mkmf.rb:1148:in `find_header' from extconf.rb:50:in `<main>' To see why this extension failed to compile, please check the mkmf.log which can be found here: C:/Ruby24/lib/ruby/gems/2.4.0/extensions/x86-mingw32/2.4.0/sqlite3-1.3.13/mkmf.log extconf failed, exit code 1
また、上記エラーの状態でRails sを行うと下記のようになりました。
Could not find sqlite3-1.3.13-x86-mingw32 in any of the sources Run `bundle install` to install missing gems.
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。