Database Drivers

Rails (in the form of Active Record) ships with a Ruby-based My SQL adapter, but it’s much advised to get the C-based one as it’s considerably faster (runs the unit tests in twice the speed). You also need to get a database driver if you want to use SQLite or Postgre SQL. These are the one you want:


Where do we change which database driver rails uses by default? Or is it just a drop in replacement?—Charles Comstock

Just update your config/database.yml and it’ll pick out the correct adapter (see vendor/activerecord/lib/active_record/connection_adapters). e.g. I installed sqlite + sqlite-ruby, here’s my database.yml
  adapter: sqlite
  dbfile: F:\Downloads\sqlite-2_8_15\rails

  adapter: sqlite
  dbfile: F:\Downloads\sqlite-2_8_15\railsdev