Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools Installing a Ruby Development Environment Installing a Ruby Development Environment Installing Ruby on Windows

Daniel Evans
Daniel Evans
5,105 Points

Help: Can't install sqlite3

I've tried installing sqlite3 from the website but when I try to do "gem install sqlite3", i get this:

C:\Users\Dan>ruby -v ruby 2.1.5p273 (2014-11-13 revision 48405) [x64-mingw32]

C:\Users\Dan>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

It seems ridiculous how difficult it is to get ruby on rails started?

2 Answers

Try looking at this Forum post to see if any of the solutions work for you:

https://teamtreehouse.com/forum/ruby-track-cant-install-sqlite3-on-win81

Christopher Rummel
Christopher Rummel
5,573 Points

I ran into the same issues installing sqlite3 on my Windows 7 machine. Went to the forum post above from Christine and entered:

$ gem install sqlite3-ruby

It worked.