Could not find sqlite3

I am trying to get Ruby/Rails running on my mac but having some issues.

I created a new rails project "blog_test" trying to get something
working.
When I follow this guide
http://guides.rubyonrails.org/getting_started.html it says to do a
"db:create". This is where I get this error...

Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in
your Gemfile.

If I do a 'which sqlite3' I get the following path /usr/bin/sqlite3.

Any help/suggestions would be appreciated.

Installed ----
Ruby 1.8.7
Rials 3.0.5

gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (3.0.5, 2.3.5, 1.3.6)
actionpack (3.0.5, 2.3.5, 1.13.6)
actionwebservice (1.2.6)
activemodel (3.0.5)
activerecord (3.0.5, 2.3.5, 1.15.6)
activeresource (3.0.5, 2.3.5)
activesupport (3.0.5, 2.3.5, 1.4.4)
acts_as_ferret (0.4.3)
arel (2.0.9)
builder (2.1.2)
bundler (1.0.10)
capistrano (2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.10)
diff-lcs (1.1.2)
dnssd (0.6.0)
erubis (2.6.6)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
haml (3.1.0.alpha.147, 3.0.25)
highline (1.5.0)
hpricot (0.6.164)
i18n (0.5.0)
libxml-ruby (1.1.2)
mail (2.2.15)
mime-types (1.16)
mongrel (1.1.5)
needle (1.3.0)
net-scp (1.0.1)
net-sftp (2.0.1, 1.1.1)
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
polyglot (0.3.1)
rack (1.2.2, 1.0.1)
rack-flash (0.1.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.5, 2.3.5, 1.2.6)
railties (3.0.5)
rake (0.8.7, 0.8.3)
RedCloth (4.1.1)
rspec (2.5.0)
rspec-core (2.5.1)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
ruby-openid (2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.6.2)
rubynode (0.1.5)
sequel (3.21.0)
shotgun (0.9)
sinatra (1.2.1)
sinatra-sequel (0.9.0)
sqlite3-ruby (1.2.4)
termios (0.9.4)
thor (0.14.6)
tilt (1.2.2)
treetop (1.4.9)
tzinfo (0.3.25)
xmpp4r (0.4)

type bundle install at the app root directory

if it does not works post you gemfile

Carl Jenkins wrote in post #988231:

I am trying to get Ruby/Rails running on my mac but having some issues.

I created a new rails project "blog_test" trying to get something
working.
When I follow this guide
http://guides.rubyonrails.org/getting_started.html it says to do a
"db:create". This is where I get this error...

Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in
your Gemfile.

sqlite3-ruby (1.2.4)
termios (0.9.4)

Maybe doing gem install sqlite3 fixes it?

Kedar Mhaswade wrote in post #988237:

Carl Jenkins wrote in post #988231:

I am trying to get Ruby/Rails running on my mac but having some issues.

I created a new rails project "blog_test" trying to get something
working.
When I follow this guide
http://guides.rubyonrails.org/getting_started.html it says to do a
"db:create". This is where I get this error...

Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in
your Gemfile.

sqlite3-ruby (1.2.4)
termios (0.9.4)

Maybe doing gem install sqlite3 fixes it?

I did a gem install sqlite3 and got this....

Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
  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.3 for inspection.
Results logged to
/Library/Ruby/Gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out

Kedar Mhaswade wrote in post #988237:

Carl Jenkins wrote in post #988231:

I am trying to get Ruby/Rails running on my mac but having some issues.

I created a new rails project "blog_test" trying to get something
working.
When I follow this guide
http://guides.rubyonrails.org/getting_started.html it says to do a
"db:create". This is where I get this error...

Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in
your Gemfile.

sqlite3-ruby (1.2.4)
termios (0.9.4)

Maybe doing gem install sqlite3 fixes it?

I tried what you mentioned and it didn't work. But, I am not sure what
you mean by "post your gem file". Which file is this?

I got this....

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.10/lib/bundler/source.rb:96:in
`install'
  from
/Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in
`run'
  from
/Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in
`each'
  from
/Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in
`each'
  from
/Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in
`run'
  from
/Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in
`install'
  from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb

Did you try sudo gem install sqlite3?

B.

I had this same problem right after install and

sudo gem install sqlite3

worked