Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: dawa sherpa
RE: SQLite3-ruby failed on FC3 [ reply ]  
2006-02-07 23:47
Actually, I found a hint from another topic on Solaris, I applied that and worked ok,

Here is what i did:
===============================================
gem install sqlite3-ruby NOTE: (Error occurred while installing sqlite3-ruby) This didn't work so I downloaded fresh source using wget
wget http://rubyforge.org/frs/download.php/3090/sqlite3-ruby-1.1.0.tar.gz
untar the file (sqlite3-ruby-1.1.0.tar.gz)
cd to sqlite3-ruby-1.1.0/ext/sqlite3_api/
Edit extconf.rb
vi /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ext/sqlite3_api/extconf.rb
do the following:
change if have_header( “sqlite3.h”) and have_library( “sqlite3”, “sqlite3_open” ) to if have_header( “sqlite3.h” ) and have_library( “rt” ) and have_library( “sqlite3”, “sqlite3_open” )

run extconf.rb
cd .. back to main sqlite3-ruby-1.1.0
now run setup.rb using ruby command
ruby setup.rb [this will install the sqlite3-ruby now]

By: dawa sherpa
SQLite3-ruby failed on FC3 [ reply ]  
2006-02-07 20:54
I am getting the following error when I try to install sqlite3 using gem install sqlite3-ruby
If anyone can give me hints or solution to this would be a great help.

error code:

Attempting local installation of 'sqlite3-ruby'
Local gem file not found: sqlite3-ruby*.gem
Attempting remote installation of 'sqlite3-ruby'
Select which gem to install for your platform (i686-linux)
1. sqlite3-ruby 1.1.0 (mswin32)
2. sqlite3-ruby 1.1.0 (ruby)
3. sqlite3-ruby 1.0.1 (ruby)
4. sqlite3-ruby 1.0.1 (mswin32)
5. sqlite3-ruby 1.0.0 (mswin32)
6. sqlite3-ruby 1.0.0 (ruby)
7. sqlite3-ruby 0.9.0 (ruby)
8. sqlite3-ruby 0.9.0 (mswin32)
9. sqlite3-ruby 0.6.0 (ruby)
10. sqlite3-ruby 0.5.0 (ruby)
11. Cancel installation
> 2
Building native extensions. This could take a while...
*** 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/local/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
--with-sqlite3lib
--without-sqlite3lib
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0 for inspection.
ruby extconf.rb install sqlite3-ruby\nchecking for sqlite3.h... yes
checking for sqlite3_open() in -lsqlite3... no


Results logged to /usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/ext/sqlite3_api/gem_make.out