Hi,
I just started reading Rails: Novice to Ninja by Glenn Goodrich and Patrick Lenz. I have followed the book to create the first application.
However, after hitting rails s command, I got an error, which seems to have several confusing ‘solutions’ when I google it, hence I run here for help.
The error read “cannot load such file – sqlite3/sqlite3_native (LoadError)”
Versions I’m using
Windows 8.1,
ruby 2.5.3,
rails 5.2.2,
64-bit DLL (x64) for SQLite version 3.26.0.
nodejs vs 10.15.0,
git 2.20.1,
So, you have to do the bundle update sqlite3 in the Rails directory where the Gemfile exists.
The second suggestion (gem 'sqlite3', git:...) means you need to open the Gemfile, replace the existing sqlite3 line with gem ‘sqlite3’, git: “https://github.com/sparklemotion/sqlite3-ruby”, save the file, then go back to the terminal and do the bundle update sqlite3