Cannot start a new rails server - sqlite.3h is missing

I am trying to run a rails server on ruby on my Windows 7 operating system. I made a new rails application but when I try to run the server I get the following error:

D:\projects\RubyOnRails>rails server
=> Booting WEBrick
=> Rails 3.2.13 application starting in development on
=> Call with -d to detach
=> Ctrl-C to shutdown server
D:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in `block in replace_gem': Please
install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the  bundle. Add it to Gemfile.)

Trying to install activerecord-sqlite3-adapter:

D:\projects\RubyOnRails>gem install activerecord-sqlite3-adapter
ERROR:  Could not find a valid gem 'activerecord-sqlite3-adapter' (>= 0) in any repository
ERROR:  Possible alternatives: activerecord-jdbcsqlite3-adapter, activerecord-sqlserver-adapter, activerecord-bq-adapter, activerecord-simpledb-adapter, activerecord-mysql2-adapter

After I try to install the sqlite3 gem I get the following error (I also had to install the DevKit to be able to proceed up to this step):

D:\projects\RubyOnRails>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.

D:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Install SQLite3 from 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.

In the System32 folder I have the sqlite3.dll, sqlite3.exe and sqlite export definition file.

Also, the sqlite3 seems to be working fine:

SQLite version 2013-04-12 11:52:43
Enter ".help" for instructions
Enter SQL statements terminated with a ";"

Also, my bundle is up to date:

D:\projects\RubyOnRails>bundle check
The Gemfile's dependencies are satisfied

However in my gemfile there is no information about the version of the sqlite3 gem and when I put one the server fails to start:

source ''

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://'

gem 'sqlite3'

Please help!


You need to install sqlite3-ruby gem instead of sqlite3 only

Go to, and download sqlitedll under "Precompiled Binaries For Windows". Extract the file and put two files sqlite3.dll and sqlite3.def in the ruby bin's directory, i.e., C:\ruby\bin. Run "gem install sqlite3-ruby" to install sqlite3-ruby gem. (Try "gem install --version 1.2.3 sqlite3-ruby" if the latest version is not working)

Need Your Help

Trouble Creating Cross Project Reference for Xcode 4

ios xcode xcode4 static-libraries

I'm trying to pick up some better code organization practices. Over time, I've developed a collection of utility-type files that I import into all of my iOS projects. Rather than continuing to copy...

Image Preprocessing steps to improve the recognition rate

android ocr tesseract

I am making a simple OCR Android App using TessBaseAPI for my project. I have done some image preprocessing steps like binarization and image inhancement. But their result is 50% to 60%. How can we

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.