0
每次我跑bundle install
,我得到這樣的輸出:問題,「sqlite的-v 1.3.10」
Shaheens-MacBook-Air:blog ShaheenG$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.4.0
Using i18n 0.6.11
Using json 1.8.1
Using minitest 5.4.3
Using thread_safe 0.3.4
Using tzinfo 1.2.2
Using activesupport 4.1.8
Using builder 3.2.2
Using erubis 2.7.0
Using actionview 4.1.8
Using rack 1.5.2
Using rack-test 0.6.2
Using actionpack 4.1.8
Using mime-types 2.4.3
Using mail 2.6.3
Using actionmailer 4.1.8
Using activemodel 4.1.8
Using arel 5.0.1.20140414130214
Using activerecord 4.1.8
Using bundler 1.6.2
Using coffee-script-source 1.8.0
Using execjs 2.2.2
Using coffee-script 2.3.0
Using thor 0.19.1
Using railties 4.1.8
Using coffee-rails 4.0.1
Using hike 1.2.3
Using multi_json 1.10.1
Using jbuilder 2.2.5
Using jquery-rails 3.1.2
Using tilt 1.4.1
Using sprockets 2.11.3
Using sprockets-rails 2.2.1
Using rails 4.1.8
Using rdoc 4.1.2
Using sass 3.2.19
Using sass-rails 4.0.4
Using sdoc 0.4.1
Using spring 1.2.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/ShaheenG/.rvm/rubies/ruby-2.1.2/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/ShaheenG/.rvm/rubies/ruby-2.1.2/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/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file.
(RuntimeError) You have to install development tools first.
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1120:in `block in find_header'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1119:in `find_header'
from extconf.rb:30:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in
/Users/ShaheenG/.rvm/gems/ruby-2.1.2/gems/sqlite3-1.3.10 for inspection. Results logged to
/Users/ShaheenG/.rvm/gems/ruby-2.1.2/extensions/x86_64-darwin-13/2.1.0-static/sqlite3-1.3.10/gem_make.out
An error occurred while installing sqlite3 (1.3.10), and Bundler
cannot continue. Make sure that `gem install sqlite3 -v '1.3.10'`
succeeds before bundling. Shaheens-MacBook-Air:blog ShaheenG$
我如何得到這個正確安裝?我試着從你的堆棧跟蹤搜索和使用brew install sqlite3
等
嘿Musannif!只是醒來,並檢查這個線程找到答案。目前正在爲mac osx yosemite下載命令行工具,生病讓你知道它是否工作! – ShaiwanGhazazani 2014-11-25 18:09:03
nope同樣的錯誤,安裝後; 錯誤:安裝sqlite3時出錯: \t錯誤:無法構建gem本機擴展。 /Users/ShaheenG/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb 檢查sqlite3.h ... *** extconf.rb失敗*** 無法創建Makefile,原因是某些原因,可能缺乏必要的庫和/或標題。檢查mkmf.log文件以獲取更多詳細信息。您可能需要配置選項 。 – ShaiwanGhazazani 2014-11-25 19:03:18
安裝後你打開了一個新的shell嗎? mkmf.log的狀態是什麼? – 2014-11-26 03:58:20