ruby on rails の環境設定をしていて、rails s をすると
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
と表示されるので、sqlite-dll-win64-x64-3330000.zipをダウンロードしsqlite3.dllをRuby26-x64/binに配置し、sqlite-amalgamation-3330000.zipをダウンロードして解凍しました。
そして、
gem install sqlite3 --version 1.3.13 --platform=ruby -- --with-sqlite3-include=C:\sqlite-amalgamation-3330000\sqlite-amalgamation-3330000 --with-sqlite3-lib=C:/Ruby26-x64/bin
を実行しましたが
sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** 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:/Ruby26-x64/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=${sqlite3-dir}/include
--with-sqlite3-lib=${sqlite3-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.3.13/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/sqlite3-1.3.13 for inspection.
Results logged to C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.3.13/gem_make.out
というエラーメッセージが表示されます。
それぞれのバージョンは以下の通りです。
ruby -v
ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
rails -v
Rails 5.2.4.4
bundler -v
Bundler version 1.17.2
あなたの回答
tips
プレビュー