0
Master:demo shaunstanislaus$ rails server Could not find gem 'sqlite3
(>= 0) ruby' in the gems available on this machine. Run `bundle
install` to install missing gems. Master:demo shaunstanislaus$ sudo
bundle install Password: Fetching gem metadata from
https://rubygems.org/......... Using rake (0.9.2.2)  Using i18n
(0.6.0)  Using multi_json (1.3.6)  Using activesupport (3.2.6)  Using
builder (3.0.0)  Using activemodel (3.2.6)  Using erubis (2.7.0) 
Using journey (1.0.4)  Using rack (1.4.1)  Using rack-cache (1.2) 
Using rack-test (0.6.1)  Using hike (1.2.1)  Using tilt (1.3.3)  Using
sprockets (2.1.3)  Using actionpack (3.2.6)  Using mime-types (1.19) 
Using polyglot (0.3.3)  Using treetop (1.4.10)  Using mail (2.4.4) 
Using actionmailer (3.2.6)  Using arel (3.0.2)  Using tzinfo (0.3.33) 
Using activerecord (3.2.6)  Using activeresource (3.2.6)  Using
bundler (1.1.5)  Using coffee-script-source (1.3.3)  Using execjs
(1.4.0)  Using coffee-script (2.2.0)  Using rack-ssl (1.3.2)  Using
json (1.7.4)  Using rdoc (3.12)  Using thor (0.15.4)  Using railties
(3.2.6)  Using coffee-rails (3.2.2)  Using jquery-rails (2.0.2)  Using
rails (3.2.6)  Using sass (3.1.20)  Using sass-rails (3.2.5) 
Installing sqlite3 (1.3.6) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
extconf.rb  mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h


Gem files will remain installed in
/Library/Ruby/Gems/1.8/gems/sqlite3-1.3.6 for inspection. Results
logged to
/Library/Ruby/Gems/1.8/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out An
error occured while installing sqlite3 (1.3.6), and Bundler cannot
continue. Make sure that `gem install sqlite3 -v '1.3.6'` succeeds
before bundling. Master:demo shaunstanislaus$

我该如何解决?

4

1 回答 1

2

我会确保你安装了 OSX 开发者工具(带有 gcc 的 XCode 等等)。如果您确定您拥有这些工具,那么下一步就是遵循之前链接的问题(安装 ruby​​-devel 和 sqlite3-devel)。

于 2012-08-05T07:51:56.827 回答