Error Installing Sqlite3 Ruby 1.2.1 Gem
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this
Gem Install Sqlite3 Error
site About Us Learn more about Stack Overflow the company Business Learn error installing sqlite3 failed to build gem native extension more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question
Sqlite3 Ruby Gem Windows
x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why checking for sqlite3.h... no can't I install the SQLite gem? up vote 49 down vote favorite 20 I'm try to install the SQLite gem on a Fedora 9 Linux box with Ruby 1.8.6, Rails 2.2.2, gem 1.3, and sqlite-3.5.9. Here's the command I'm running and its results: sudo gem install sqlite3-ruby Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem sqlite3 gem native extension. /usr/bin/ruby extconf.rb install sqlite3-ruby can't find header files for ruby. Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4/ext/sqlite3_api/gem_make.out gem_make.out just repeats what was already sent to the console. How can I install this gem? ruby-on-rails ruby sqlite gem share|improve this question edited Nov 26 '14 at 20:23 Makoto 54.7k1065116 asked Jan 7 '09 at 17:30 Eric Noob 6963914 I got this error constantly too !! –Perpetualcoder Jan 7 '09 at 17:41 1 The clue in the error is "can't find header files for ruby" ... that means you will need the development package for ruby. –salt.racer Jan 7 '09 at 20:49 @salt.racer / ANY ONE THERE - can you pls post what package(mainly) is required. –Sudhakar Krishnan Jan 1 '14 at 10:50 add a comment| 12 Answers 12 active oldest votes up vote 114 down vote accepted The SQLite RubyGem isn't actually a *Ruby*Gem, it's a "*C*Gem", IOW it's written in C. This means it has to be compiled and linked to the Ruby interpreter when you install it and in order to do that it needs
here for a quick overview of the site Help Center Detailed answers to
Error: Failed To Build Gem Native Extension
any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer http://stackoverflow.com/questions/421225/why-cant-i-install-the-sqlite-gem site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Problem installing SQLite3 RubyGem on Ubuntu up vote 3 down vote favorite I http://superuser.com/questions/90955/problem-installing-sqlite3-rubygem-on-ubuntu am having a problem trying to install the SQLite3 RubyGem. Here's what I'm doing: $ sudo gem install --remote sqlite3-ruby Here's the output: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb checking for fdatasync() in -lrt... yes checking for sqlite3.h... no *** 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=/usr/bin/ruby1.8 --with-sqlite3-dir --without-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib --with-rtlib --without-rtlib Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/ext/sqlite3_api/gem_make.out ruby rubygems sqlite share|improve this question asked Jan 4 '10 at 3:12 Andrew 5,267245375 can you post the contents of /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.5/ext/sqlite3_api/gem_make.out –Sathya♦ Jan 4 '10 at 14:58 the contents o
06:39 AM ramyayella 11 http://www.skorks.com/2009/08/installing-and-using-sqlite-with-ruby-on-windows/ post(s) I tried to install sqlite3-ruby in mu bitnami rubystack. It gives me the following error. My rubystack is in folder /home/ramya/bloglearn/deployment bash-4.1$ gem install sqlite3-ruby Building native error installing extensions. This could take a while… ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /home/ramya/bloglearn/deployment/rubystack-2.1-0/ruby/bin/ruby extconf.rb checking for sqlite3.h… no sqlite3.h is missing. Try ‘port install sqlite3 +universal' or ‘yum install sqlite3-devel' error installing sqlite3 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=/home/ramya/bloglearn/deployment/rubystack-2.1-0/ruby/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 Gem files will remain installed in /home/ramya/bloglearn/deployment/rubystack-2.1-0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1 for inspection. Results logged to /home/ramya/bloglearn/deployment/rubystack-2.1-0/ruby/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.3.1/ext/sqlite3/gem_make.out bash-4.1$ gem install sqlite3-ruby Building native extensions. This could take a while… ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /home/ramya/bloglearn/deployment/rubystack-2.1-0/ruby/bin/ruby extconf.rb checking for sqlite3.h… no sqlite3.h is missing. Try ‘port install sqlite3 +universal' or ‘y
not require configuration. However when I tried to use it in my Ruby code I found that it wasn’t that straight forward getting everything to work, especially if you’re using Ruby on windows. The information on the old WWW was rather sparse. I worked it out eventually, so in the interests of being a helpful web denizen I thought I’d share. What To Download And Where To Put It First thing first, before we involve Ruby directly lets download set up everything we need. You need to download two things from the SQLite website (well strictly speaking you only actually NEED one, but we’ll download both since the other one is useful): sqlitedll-3_6_16.zip – you can think of this one as actually being the SQLite database that you will install on your machine sqlite-3_6_16.zip – this one is a command line utility that can be used to administer a SQLite database Both of those files are located on the downloads page - http://www.sqlite.org/download.html, under the ‘Precompiled Binaries For Windows’ section. Once you unzip both of those you will have several files, the important ones are: sqlite3.dll – this is the actual database sqlite3.exe – this is the command line utility You need to take the DLL and put it somewhere, where Ruby would look for libraries when you execute a script, some possible locations would be, your windows system folder or the bin folder of your Ruby installation (Note: as reader Luis Lavena noted in the comments below, the ruby installation bin folder is by far the best place to put the DLL). On my machine it was: C:\ruby1.8\bin C:\WINDOWS\system C:\WINDOWS\system32 You can also put the command line utility in any of those places as well, but you don’t have to as you can use that one from anywhere (if you do put it in another location make sure that location is in the PATH environment variable otherwise you will have to specify the full path to it every time you want to use it). You’re now ready to install the SQLite Ruby interface gem. You will need to do the following: gem install sqlite3-ruby After it completes you will have a gem similar to the following in your gem repository, in my case: C:\ruby1.8\lib\ruby\gems\1.8\gems\sqlite3-ruby-1.2.5-x86-mswin32 You’re now ready to work with SQLite in your Ruby application. Note that you need to install the ‘sqlite3-ruby’ gem and not the ‘sqlite-ruby’ one, as that is the old one. If you did not install the DLL correctly you might get an error similar to the following when yo