-4

I'm new to ruby on rails, having a problem with installing sqlite3 -v 1.4.0 each time I run bundle install and am not able to start rails server because of this.

I am on windows 7

current directory:
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0/ext/sqlite3
C:/RailsInstaller/Ruby2.3.3/bin/ruby.exe -r ./siteconf20190428-4968-1wrdwr0.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.3.3/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

To see why this extension failed to compile, please check the mkmf.log which can

be found here:

C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sql
ite3-1.4.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/gems/sqlite3-1.4.0 for
inspection.
Results logged to
C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sql
ite3-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.

In Gemfile:
  sqlite3

c:\Sites\blog>
Vasfed
  • 18,013
  • 10
  • 47
  • 53
Olabode
  • 1
  • 3
  • Wow, what a long error message. Reading through it all, it says that it wrote more details at `C:/RailsInstaller/Ruby2.3.3/lib/ruby/gems/2.3.0/extensions/x86-mingw32/2.3.0/sql ite3-1.4.0/mkmf.log`. Have you checked that file for any more leads about what might have gone wrong? – Joe Amenta Apr 28 '19 at 15:04
  • 3
    Followin Joe Amenta comment, I think the most important part in your error message is: `checking for sqlite3.h... no sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first` – Zeitounator Apr 28 '19 at 15:07

2 Answers2

1

Your error contains a recommendation inside it:

sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first

sqlite3 gem is only a wrapper around it, you need SQLite in your system to compile and install it.

Vasfed
  • 18,013
  • 10
  • 47
  • 53
0

type ridk exec pacman -S mingw-w64-x86_64-dlfcn in command line, install this, and try again