sqlite 3 error

I have installed Ruby on Rails .

rails -v=>3.0.7

gem -v=>1.3.6

ruby -v=>ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

when i tried to start the server by “rails s” or tried to do anything it gives the error

Could not find gem ‘sqlite3 (>= 0, runtime)’ in any of the gem sources listed in your Gemfile.

Run bundle install to install missing gems.

Please somebody help me to get rid of it…:stuck_out_tongue:

Thanks in advance



first you need to install sqlite3. In Ubuntu: sudo apt-get install libsqlite3-dev

Second install the sqlite gem gem install sqlite3-ruby

see here for example installation - Rails 3 can not find sqlite3-ruby - Stack Overflow

I am not sure if rails 3 works with ruby 1.8.7 but I would recommend you to switch to version 1.9.2 anyway

Do, what it says… run ‘bundle install’ on your app.

Or manually install sqlite3 gem

I tried “bundle install” from app.I couldn’t work too.error persists.




gem install sqlite3,


try this mysql db

rails my_new_app --database=mysql



Rails 3 and even 3.1.0rc4 work fine with ruby 1.8.7.

Make sure the place you will eventually deploy to supports Ruby 1.9.2 before switching. I just had to downgrade to deploy to Dreamhost because their passenger won't work with anything but 1.8.7.

Thank you very much.

one thing left .now i can start old rail app but it gives the error of rake when i did “rake db:create”

rake aborted!

You have already activated rake 0.9.2, but your Gemfile requires rake 0.8.7. Consider using bundle exec.

(See full trace by running task with --trace)


Teri you are right, ruby 1.8.7 works fine.

You can check with "gem list" which gems are installed. Probably you have a newer version installed (0.9.2) as required in your Gemfile (0.8.7). So try running "bundle exec rake" instead of just rake. See here for example: Confused with rake error in Rails 3 - Stack Overflow

I encourage you to use the ruby version manager. It enables you to switch between different gem sets really easy and you can install different gem versions for different projects.