QA@IT

ruby on rails の環境構築について

312 PV

僕はプログラミングを1か月前に勉強し始めたずぶずぶの初心者です
現在このサイト(https://prog-8.com/docs/rails-env-win)を手本に環境構築をしています。
現状としてatom,ruby,ruby on rails,SQlite3のインストールが完了しています。
上のサイトの 7. gem「sqlite3」の再インストール という項目で
gem uninstall sqlite3 --all と ridk exec pacman -S mingw-w64-x86_64-sqlite3 を実行後
gem install sqlite3 -v 1.3.13 --platform=ruby を実行すると

Fetching: sqlite3-1.3.13.gem(100%)
Temporalily enhancing PATH for MSYS/MINGW...
Building native extionsions. This could take a while...
Successfully installed sqlite3-1. 3. 13
Parsing documentation for sqlite3-1.3. 13
Installing ri documentation for sqlite3-1.3. 13
Done installing documentation for sqlite3 after
1 seconds 1 gem installed

の様に表示されるそうなのですが、僕の場合は

C:\Users 0 sample_app/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:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13/ext/sqlite3
C:/Ruby25-x64/bin/ruby.exe -r ./siteconf20190702-1128-namclt.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
Tibraries and/or headers. Check the mkmt. log file for more details. You may
need cont iguration 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:/Ruby25-x64/bin/$(RUBY_BASE_NAME)
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:456: in 'try_do': The compiler failed to generate an executable file. (Runt imeError),
You have to install development tools first.
from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:541: in 'try_linko
from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb:559: in try_link',
from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb: 660: in 'try_Idflags'
from C:/Ruby25-x64/lib/ruby/2.5.0/mkmf.rb: 1820: in pkg_config
from extcont.rb:27: in
To see why this extension failed to compile, please check the mkmf. Tog which can be found here:
C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/sqlite3-1.3.13/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/sqlite3-1.3.13 for inspection.
Results logged to C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/sqlite3-1.3.13/gem_make.out

ように表示されてしまいます。
どなたか解答よろしくお願いします。

ウォッチ

この質問への回答やコメントをメールでお知らせします。