When I run 'rails server' I get the following error:
Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
My GemFile looks like this: gem 'sqlite3'
Also when I run the port command it says it does not recognize that command:
Mohammad-Azams-MacBook-Pro:blog azamsharp$ port install sqlite3 +universal
-bash: port: command not found
Any suggestions?
UPDATE 1:
I run sudo gem install sqlite3 and got the following message:
Mohammad-Azams-MacBook-Pro:blog azamsharp$ sudo gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... no
sqlite3 is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
UPDATE 2: (Contents of GemFile)
source 'http://rubygems.org'
gem 'rails', '3.0.7'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
UPDATE 3:
Mohammad-Azams-MacBook-Pro:blog azamsharp$ port search sqlite3
-bash: port: command not found
UPDATE 4:
After downloading the install Macports I ran the bundle install again and here is the result:
Installing sqlite3 (1.3.3) with native extensions /usr/local/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in
build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/local/bin/ruby extconf.rb checking for sqlite3.h... yes checking for sqlite3_libversion_number() in -lsqlite3... no sqlite3 is missing. Try 'port install sqlite3 +universal' or 'yum install sqlite3-devel' and check your shared library search path (the location where your sqlite3 shared library is located). * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.
`
UPDATE 5:
which sqlite3 gives me the following:
Mohammad-Azams-MacBook-Pro:blog azamsharp$ which sqlite3
/opt/local/bin/sqlite3
UPDATE 5:
which -a sqlite3 gives me the following:
Mohammad-Azams-MacBook-Pro:blog azamsharp$ which -a sqlite3
/opt/local/bin/sqlite3
/usr/local/bin/sqlite3
/usr/bin/sqlite3