Create Rails Hello World and got “sqlite3.h is missing” error

By | 30th December 2015


  • OS: Debian 8
  • Ruby version: ruby 2.1.5p273 (2014-11-13) [i386-linux-gnu]
  • Rails version: Rails 4.2.5
  • Ruby and Rails are installed and trying to create the first application.
> rails new hello_app
Installing sqlite3 1.3.11 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby2.1 extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'


As the error message suggested, sqlite3.h header file is missing – installing sqlite3 dev to resolve the issue.

> sudo apt-get install libsqlite3-dev


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.