0
votes

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:ininstall' 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:inrun' 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:ineach' 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:ininstall' 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:insend' 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:ininvoke_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:instart' 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?

1
You have ruby 1.9.2 installed, but is it the first one on your path? what does which ruby point to?JasonTrue
/usr/bin/ruby that's the output of "which ruby"Matthew Berman
and what does ruby -v tell you?JasonTrue
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] wtf...it was just 1.9.2 last night...I have it installed...i saw it last night...what would have made it revert back?Matthew Berman
That should answer your question. Just because you have ruby 1.9.2 installed doesn't mean you're using it. You probably didn't update your path (or your installer didn't).JasonTrue

1 Answers

2
votes

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).