5

I am making an application that does not, as of now, require a database. So I want to disable it!

I am making this with Rails 3beta4 with Postgres 8.4.x.

In order to serve up a view, Rails 3 seems to need the database specified in database.yml to exist--why? I never checked this with Rails 2.3, but it seems silly that it should need to connect to the database if I don't pull any data from it. Which means I never want to connect to the database at all for this application.

chadoh
  • 4,343
  • 6
  • 39
  • 64
  • Very similar question [here](http://stackoverflow.com/questions/2212709/remove-activerecord-in-rails-3-beta). Just tried it. Works a charm. – Ceilingfish Jun 29 '10 at 21:53

2 Answers2

2

If you are creating a new application, you can use 'skip-active-record' to skip database configuration:

rails new my_app --skip-active-record
Nanego
  • 1,890
  • 16
  • 30
0

Go to config and make the following changes in the database.yml file

under the database development, comment out your database. This way controller will stop looking for the database.

Once you're ready to use your database, just uncomment the above.