Why can't I get sqlite installed?
When I go to install using "sudo bundle install" to install all of them...it throws an error on sqlite3:
Installing sqlite3 (1.3.3) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:533:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/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.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
from /Library/Ruby/Site/1.8/rubygems/installer.rb:486:in `each'
from /Library/Ruby/Site/1.8/rubygems/installer.rb:486:in `build_extensions'
from /Library/Ruby/Site/1.8/rubygems/installer.rb:159:in `install'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/source.rb:96:in `install'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/installer.rb:55:in `run'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in `run'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/installer.rb:8:in `install'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/cli.rb:225:in `install'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/vendor/thor/task.rb:22:in `send'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in `start'
from /Librar开发者_StackOverflowy/Ruby/Gems/1.8/gems/bundler-1.0.12/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
Then I think maybe I have it already installed because i've used it before...but when I do "rake db:create" it gives me this:
Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.
What am I doing wrong?
Make sure you have XCode installed. The necessary header files should be installed by that.
Also, unrelated advice, stop using sudo. Look into installing RVM. It will make your life easier.
Related question: Snow Leopard & Ruby on Rails - SQLite3 issue
You may be missing the sqlite3.dll file. Go to the bin folder in your ruby folder and look for a sqlite3.dll file. If you can't find it there then download it for http://www.sqlite.org/download.html. Then put the dll file in your bin(ruby's bin) folder and run bundle install again and see if that works.
精彩评论