Не удается установить гем sqlite3

Я пытаюсь установить гем "sqlite3-ruby" (или гем "sqlite3") в OS X 10.6. Я использую ruby-1.9.2 и в настоящее время получаю следующее:

 $ sqlite3 --version
3.7.4
 $ sudo gem install sqlite3
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
    ERROR: Failed to build gem native extension.

/Users/folken/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for sqlite3.h... *** 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=/Users/folken/.rvm/rubies/ruby-1.9.2-head/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
/Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:853:in `block in find_header'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
    from /Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:852:in `find_header'
    from extconf.rb:28:in `<main>'


Gem files will remain installed in /Users/folken/.rvm/gems/ruby-1.9.2-head/gems/sqlite3-1.3.3 for inspection.

Ниже приведены результаты which & whereis, а sqlite3.h находится в / opt / local / include:

 $ which sqlite3
/opt/local/bin/sqlite3
 $ whereis sqlite3
/usr/bin/sqlite3

Я также попытался передать следующее:

sudo gem install sqlite3 -- --with-sqlite3-include /opt/local/include --with-sqlite3-lib /opt/local/lib
sudo gem install sqlite3 -- --with-sqlite3-dir /opt/local/bin

, что привело к следующему:

ERROR:  Error installing sqlite3-ruby:
    ERROR: Failed to build gem native extension.

/Users/folken/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb --with-sqlite3-dir /usr/bin/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=/Users/folken/.rvm/rubies/ruby-1.9.2-head/bin/ruby
    --with-sqlite3-dir
/Users/folken/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/mkmf.rb:1336:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError)
    from extconf.rb:9:in `<main>'

Также в /Users/folken/.rvm/gems/ruby-1.9.2-head/gems: sqlite-рубин-2.2.3 sqlite3-1.3.3

Под RVM у меня есть ruby-1.8.7, и драгоценный камень sqlite3 отлично загружается на нем, но после долгих поисков в Google я не нашел решения, которое подойдет мне. Приветствуется любая помощь (даже если она требует ручной установки / взлома для начала работы).

16
задан Folken 17 February 2011 в 13:16
поделиться