My app does not need to talk to any database

My Rails 3.1 app doesn't need to talk to any database.

Nonetheless, Rails is attempting to connect to a database and failing.
How do I prevent my app from connecting?

Ralph Shnelvar

Well you could just define a sqlite database in your database.yml file
and then just ignore everything

When you create a new app you can use the option --skip-active-record
or -O (they are the same thing, rails -h will show the options).

If you have already created the app then see
for how to remove activerecord, though I have not tried this myself.


In config/application.rb comment require “active_record/railtie” line

Pick the frameworks you want:

require “active_record/railtie”

require “action_controller/railtie”

require “action_mailer/railtie”
require “active_resource/railtie”
require “sprockets/railtie”

require “rails/test_unit/railtie”

Gautam Pai

when creating a new app just use -O or --skip-activerecord

rails new myApp -O


rails new myApp --skip-activerecord

Gautam Pai