Grrr…still I got a problem… ‘failed to build gem native
extension’…
… 
C:\Ruby200\devkit>gem install sqlite3 --platform=ruby –
–with-sqlite3-include=
c:/knapsack/sqlite/include --with-sqlite3-lib=c:/knapsack/sqlite/lib
–with-sqli
te3-dir=c:/knapsack/sqlite/bin
Temporarily enhancing PATH to include DevKit…
Building native extensions with:
‘–with-sqlite3-include=c:/knapsack/sqlite/incl
ude --with-sqlite3-lib=c:/knapsack/sqlite/lib
–with-sqlite3-dir=c:/knapsack/sql
ite/bin’
This could take a while…
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
–with-sqlite3-include=c:/knapsack/sqlite
/include --with-sqlite3-lib=c:/knapsack/sqlite/lib
–with-sqlite3-dir=c:/knapsac
k/sqlite/bin
checking for sqlite3.h… yes
checking for sqlite3_libversion_number() in -lsqlite3… no
sqlite3 is missing. Install SQLite3 from http://www.sqlite.org/ first.
*** 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=C:/Ruby200/bin/ruby
–with-sqlite3-dir
–with-sqlite3-include=${sqlite3-dir}/include
–with-sqlite3-lib=${sqlite3-dir}/
–enable-local
–disable-local
–with-sqlite3lib
–without-sqlite3lib
Gem files will remain installed in
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1
.3.7 for inspection.
Results logged to
C:/Ruby200/lib/ruby/gems/2.0.0/gems/sqlite3-1.3.7/ext/sqlite3/
gem_make.out
Please try using the instructions and the zip file I posted in the
thread I mentioned earlier.
PS. I installed devkit and did a test installation…
Thank you for your help and patience Joel. I have done all steps
mentioned above and still I get an error message. I give up . I can
continue to work with datamapper that works for me.
Maybe I’ll try active record on my mac when I get home.
Br
cristian
As your error code said you need to install SQLite3 from
http://www.sqlite.org/ … In addition to the gem theres the need of a
engine…
El 02/08/2013 12:59, “cristian cristian” [email protected] escribi:
Manuel, the instructions and files provided compile the exe as well as
installing the gem. The instructions also state where to place the
additional libraries.
cristian, the error message you posted stated “knapsack”, which isn’t
part of my instructions. If you follow the instructions I provided, with
the zip file I uploaded, then the error message might be more meaningful
to me and we can continue to trace the error to its source.
It would also be helpful to provide the results of this command for
debugging (to ensure all the files are in the right place):
C:>cd \rails\sqlite
C:\rails\sqlite>dir /s /b
Ok, that makes sense.
The key to the error is this line:
ERROR: Failed to build gem native extension.
I think everything after that is a knock-on effect of the rest of the
process failing when it can’t build sqlite.
However, normally that error line is followed by a more detailed error
reason. The fact that it hasn’t provided any further error details is
what makes this difficult to trace.
Joel, I dont have rails thats why I didnt extract it in a rails-folder.
When I followed the other instructions made by Scott I created a folder
named knapsack and I re-used it when following your instructions. I
created sqlite folder within the folder knapsack.
if I do:
c:> cd \knapsack\sqlite
c:\knapsack\sqlite>dir /s /b
I get this:
C:\knapsack\sqlite>dir /s /b
C:\knapsack\sqlite\bin
C:\knapsack\sqlite\include
C:\knapsack\sqlite\lib
C:\knapsack\sqlite\share
C:\knapsack\sqlite\sqlite.zip
C:\knapsack\sqlite\sqlite3.def
C:\knapsack\sqlite\sqlite3.dll
C:\knapsack\sqlite\bin\sqlite3.exe
C:\knapsack\sqlite\include\sqlite3.h
C:\knapsack\sqlite\include\sqlite3ext.h
C:\knapsack\sqlite\lib\libsqlite3.a
C:\knapsack\sqlite\lib\libsqlite3.la
C:\knapsack\sqlite\lib\pkgconfig
C:\knapsack\sqlite\lib\pkgconfig\sqlite3.pc
C:\knapsack\sqlite\share\man
C:\knapsack\sqlite\share\man\man1
C:\knapsack\sqlite\share\man\man1\sqlite3.1