From: Erik Veenstra Date: 2005-01-26T02:15:49+09:00 Subject: SQLite-Ruby and Cygwin: Problem and Solution I had a problem installing SQLite-Ruby under Cygwin. But we solved the problem... Installing SQLite (sqlite-2.8.15.tar.gz) itself was no problem: "./configure ; make ; make install" worked, as expected. Installing SQLite-Ruby with "gem install sqlite-ruby-2.2.2.gem" didn't work. It couldn't find the header files or library or whatever of SQLite, although SQLite itself (the command line tool) worked on an existing database. I added just one single line to ext/extconf.rb ('dir_config( "sqlite", "/usr/local" )'), compiled the whole thing and build the gem. This one was indeed installable! If you encountered the same problem, here is the "script". Maybe something for the sqlite-ruby maintainers to correct? Thanks for this great library. I like it. The combination of SQLite as back end, WXRuby or RubyWebDialogs as front end and Ruby itself for the logic, gives us a 100% platform agnostic way of building applications. We at least cover Linux, Windows and Cygwin. I don't know anything about OS X, Solaris or other systems. Oh, by the way: Did I already mention that both SQLite and WXRuby (and RubyWebDialogs, of course) are detected and embedded by RubyScript2Exe?... gegroet, Erik V. ---------------------------------------------------------------- $ tar xzf sqlite-ruby-2.2.2.tar.gz $ cd sqlite-ruby-2.2.2/ $ cd ext/ $ vi extconf.rb # !!! Add: dir_config( "sqlite", "/usr/local" ) !!! $ ruby extconf.rb checking for main() in -lsqlite... yes checking for sqlite.h... yes checking for sqlite_open() in -lsqlite... yes creating Makefile $ make gcc -g -O2 -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/usr/lib/ruby/1.8/i386-cygwin -I. -DHAVE_SQLITE_H -I/usr/local/includ e -c sqlite-api.c gcc -shared -s -Wl,--enable-auto-import,--export-all -L"/usr/local/lib" -L"/usr/lib" -o sqlite_api.so sqlite-api.o -lr uby -lsqlite -lsqlite -lcrypt $ cd .. $ touch README $ gem build sqlite-ruby.gemspec Attempting to build gem spec 'sqlite-ruby.gemspec' Successfully built RubyGem Name: sqlite-ruby Version: 2.2.2 File: sqlite-ruby-2.2.2.gem $ gem install sqlite-ruby-2.2.2.gem Attempting local installation of 'sqlite-ruby-2.2.2.gem' Building native extensions. This could take a while... ruby extconf.rb install sqlite-ruby-2.2.2.gem checking for main() in -lsqlite... yes checking for sqlite.h... yes checking for sqlite_open() in -lsqlite... yes creating Makefile make make: Nothing to be done for `all'. make install install -c -p -m 0755 sqlite_api.so /usr/lib/ruby/gems/1.8/gems/sqlite-ruby-2.2.2/lib Successfully installed sqlite-ruby, version 2.2.2 Installing RDoc documentation for sqlite-ruby-2.2.2... ----------------------------------------------------------------