Hi there,
*1. THE SITUATION*
I try to create my first Sinatra (Ruby) app. Therefore I want to use the
"dm-sqlite-adapter" gem,
which shall now be installed after "data_mapper" was installed before.
*2. THE PROBLEM*
So I did run:
sudo gem install dm-sqlite-adapter
>
in the terminal and got the following output:
Building native extensions. This could take a while...
ERROR: Error installing dm-sqlite-adapter:
ERROR: Failed to build gem native extension.
> /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
> extconf.rb
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=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/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
> /Library/Ruby/Gems/1.8/gems/do_sqlite3-0.10.12 for inspection.
Results logged to
> /Library/Ruby/Gems/1.8/gems/do_sqlite3-0.10.12/ext/do_sqlite3/gem_make.out
In addition, in the mkmf.log it's written:
have_header: checking for sqlite3.h... -------------------- no
> "xcrun cc -E -I.
> -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0
>
> -I. -I/usr/local/include -I/opt/local/include -I/usr/include
> -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -g -Os -pipe -fno-common
> -DENABLE_DTRACE -fno-common -pipe -fno-common -Wall conftest.c -o
> conftest.i"
> xcode-select: Error: No Xcode is selected. Use xcode-select -switch
> <path-to-xcode>, or see the xcode-select manpage (man xcode-select) for
> further information.
> checked program was:
> /* begin */
> 1: #include <sqlite3.h>
> /* end */
> --------------------
>
*3. A SOLUTION, not yet.*
Does anybody know how to tackle this issue?
I did already look on several websites (including a question at
Stackoverflow<http://stackoverflow.com/questions/12451964/gem-install-sqlite3-gives-error-sqlite3-h-is-missing>,
or
this<http://stackoverflow.com/questions/1143776/install-sqlite3-on-mac-osx>one)
where they recommend to use "sudo
apt-get install libsqlite3-dev" which is only valid for Ubuntu or similar
Linux operating systems. I can't seem to find the right way to make the
sqlite3.h (Header file) detectable.
But I did install sqlite3 using MacPorts with:
sudo port install sqlite3
>
> and asking the terminal with "which sqlite3" results in:
/opt/local/bin/sqlite3
So, sqlite3 seems to be installed properly.
*4. ASK FOR HELP*
Any tip or link is very much appreciated!
Thanks in advance,
- Alex
--
You received this message because you are subscribed to the Google Groups
"DataMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/datamapper?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.