I am trying to create a new Ruby On Rails project. I am following the official Getting Started with Rails guide. After running the Rails Installer for Ruby 2.2 I attempt to create a new project by running rails new blog
and get the following error:
...
Installing sqlite3 1.4.0 with native extensions
Installing turbolinks-source 5.2.0
Installing i18n 1.6.0
Installing tzinfo 1.2.5
Installing nokogiri 1.10.2
Using rack-test 0.6.3
Installing sprockets 3.7.2
Installing websocket-driver 0.6.5 with native extensions
Installing mail 2.7.1
Using coffee-script 2.4.1
Installing uglifier 4.1.20
Installing rb-inotify 0.10.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/RailsInstaller/Ruby2.2.0/bin/ruby.exe -r
./siteconf20190406-3720-ldo4eg.rb extconf.rb
checking for sqlite3.h... no
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:/RailsInstaller/Ruby2.2.0/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
extconf failed, exit code 1
Gem files will remain installed in
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/gems/sqlite3-1.4.0 for
inspection.
Results logged to
C:/RailsInstaller/Ruby2.2.0/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/sqlite3-1.4.0/gem_make.out
An error occurred while installing sqlite3 (1.4.0), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.4.0'` succeeds before bundling.
There are many "solutions" to this problem online. They all explain different ways to install sqlite manually. I have tried installing sqlite manually but do not know how to install it so that Rails knows where to find my local installation. There are many different suggestions online for how to do this, and none of them have worked for me.
I have spent over six hours trying to simply create a new Rails project and keep getting this error (or similar errors). It is my understanding that the Rails Installer is supposed to install everything you need to get started. What am I doing wrong?