user4362206
user4362206

Reputation:

fail to 'gem install sqlite3'

When I run rails new todo, it appears as follows(related question Make sure that 'gem install ~ ' succeeds before bundling).

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read
server certificate B: certificate verify failed (https://rubygems.org/gems/sqlit
e3-1.3.10-x64-mingw32.gem)
An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
continue.
Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.

When I run gem install sqlite3, it appears as follows.

C:\Ruby21-x64>gem install sqlite3
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3:
        ERROR: Failed to build gem native extension.

    C:/Ruby21-x64/bin/ruby.exe 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:/Ruby21-x64/bin/ruby
        --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:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/sqlite
3-1.3.10 for inspection.
Results logged to C:/Ruby21-x64/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0
/sqlite3-1.3.10/gem_make.out

Following my textbook, I have already downloaded 'sqlite-shell-win32-x86' , made 'c:\sqlite3' folder , added 'sqlite3.exe' in that folder and added path 'c:\sqlite3'.

What should I do? I can't start RoR...

Added

He says

checking for sqlite3.h... no
sqlite3.h is missing.

I found sqlite3.h(this is in the sqlite-amalgamation folder), so I guess what I do next is to put it in the proper folder. Where is that? I put sqlite3.h in the folder in which ruby.exe is, but he still says sqlite3.h is missing..

Upvotes: 2

Views: 4487

Answers (1)

Jorge de los Santos
Jorge de los Santos

Reputation: 4643

You lack the system dependecies that the gem requires.

sudo apt-get install sqlite3 libsqlite3-dev

http://www.askyb.com/sqlite/installing-sqlite-in-ubuntu/

Upvotes: 5

Related Questions