Guide for sqlite3-ruby installation on Windows without 'LoadError'.
C:\>ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x64-mingw32]
C:\>irb
irb(main):001:0> require 'sqlite3'
=> true
gem uninstall sqlite3 --all
- Download the latest sqlite3-ruby, https://github.com/sparklemotion/sqlite3-ruby
- unzip the package
- run command-line in the extracted dir
- make sure you have your C compiler installed and added to PATH
gem install bundler
bundle install
rake native gem
- you'll find a dir named 'pkg' generated
- enter dir 'pkg'
gem install --local sqlite3-xxx.gem
('xxx' is version code)
irb
require 'sqlite3'