I've used sqlite before. My friend sent me a skeleton rails app that I am trying to run.
When I try to do "rails server" or "thin start" it says
Could not find sqlite3-0.1.1 in any of the sources"
I tried to do bundle install but it throws this error:
Installing sqlite3 (0.1.1) /Library/Ruby/Site/1.8/rubygems/installer.rb:364:in
ensure_required_ruby_version_met': sqlite3 requires Ruby version >= 1.9.1. (Gem::InstallError) from /Library/Ruby/Site/1.8/rubygems/installer.rb:135:in
install' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/source.rb:96:ininstall' 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:ineach' 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:inrun' 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:inrun' 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:indispatch' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in
start' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/bin/bundle:13 from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19
I don't know why it's trying to look in the 1.8 folder with Ruby 1.9.2 installed.
What am I doing wrong?
Your bundle
command is pointing to your system Ruby, type the following to see which Ruby your Bundler is pointed to: head -1 $(which bundle)
Either that needs to be pointed at the Ruby you want to use and/or you need to use the Ruby you want to use to install the Bundler gem (which will put the right shebang line in your bundle
executable).
精彩评论