我在MacOs 10.8.3上我有ruby 1.8.7并且我将它更新为ruby 2.1.0。我在轨道3.2.8。
因为我在尝试创建新应用时更新了我的ruby版本。 我在捆绑安装步骤中收到错误。
Gem files will remain installed in /Users/mehdisoudsane/.rvm/gems/ruby-2.1.0/gems/sqlite3-1.3.8 for inspection.
Results logged to /Users/mehdisoudsane/.rvm/gems/ruby-2.1.0/extensions/x86_64-darwin-12/2.1.0-static/sqlite3-1.3.8/gem_make.out
An error occurred while installing sqlite3 (1.3.8), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.8'` succeeds before bundling.
所以我试着做gem install sqlite3 -v'1.3.8但是我得到了这个(请你帮帮我)
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby/2.1.0/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
--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=/usr/local/Cellar/ruby/2.1.0/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
--enable-local
--disable-local
/usr/local/Cellar/ruby/2.1.0/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 /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:587:in `try_cpp'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:1120:in `block in find_header'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:918:in `block in checking_for'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels) in postpone'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpone'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/mkmf.rb:1119:in `find_header'
from extconf.rb:34:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/mehdisoudsane/.rvm/gems/ruby-2.1.0/gems/sqlite3-1.3.8 for inspection.
Results logged to /Users/mehdisoudsane/.rvm/gems/ruby-2.1.0/extensions/x86_64-darwin-12/2.1.0/sqlite3-1.3.8/gem_make.out