Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the database on Rails 3 for a webservice-based application

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.

like image 741
chadoh Avatar asked Nov 05 '22 11:11

chadoh


1 Answers

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

rails new my_app --skip-active-record
like image 81
Nanego Avatar answered Nov 15 '22 06:11

Nanego