24 Mar 2013, 09:01
Generic-user-small

Louis Rhys (22 posts)

I tried to setup new project in Ubuntu. When I run rails new demo, I get this error

`Installing sqlite3 (1.3.7) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /home/hrasyid/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb  checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite-devel' and check your shared library search path (the location where your sqlite3 shared library is located). *** 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.`

I have already installed sqlite3 in my Ubuntu. I tried “gem install sqlite3” and it is throwing similar error `Building native extensions. This could take a while… ERROR: Error installing sqlite3: ERROR: Failed to build gem native extension.

    /home/hrasyid/.rvm/rubies/ruby-1.9.2-p320/bin/ruby extconf.rb checking for sqlite3.h... no sqlite3.h is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite-devel' and check your shared library search path (the location where your sqlite3 shared library is located). *** 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.`

Any idea what’s wrong here? I am also new to Ubuntu

24 Mar 2013, 13:37
Samr_small_pragsmall

Sam Ruby (584 posts)

Try:

sudo apt-get install libsqlite3-dev
  You must be logged in to comment