# Using rails without a database

**URL:** <https://discuss.rubyonrails.org/t/using-rails-without-a-database/13239>\
**Category:** rubyonrails-talk\
**Created:** [May 21, 2007, 6:05pm UTC](https://discuss.rubyonrails.org/t/using-rails-without-a-database/13239 "2007-05-21T18:05:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![isopaleocopria](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@isopaleocopria](https://discuss.rubyonrails.org/u/isopaleocopria)\
**Post date:** [May 21, 2007, 6:05pm UTC](https://discuss.rubyonrails.org/t/using-rails-without-a-database/13239/1 "2007-05-21T18:05:43Z")

</div>

I want to try writing a rails app, using edge rails, all models of which will extend ActiveResource. In other words, I don't need a database.

How do I configure my app so that rails doesn't look for an RDBMS and database? This is a problem for example when I run rake tasts, as rake attempts to connect to the default DB. I tried commenting out everything in the database.yml file, but that didn't work.

---

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [May 21, 2007, 6:39pm UTC](https://discuss.rubyonrails.org/t/using-rails-without-a-database/13239/2 "2007-05-21T18:39:07Z")

</div>

Isopaleocopria

&nbsp;&nbsp;\> I want to try writing a rails app, using edge rails, all models of &nbsp;&nbsp;\> which will extend ActiveResource. In other words, I don't need a &nbsp;&nbsp;\> database.

Just use sqlite3, and you won't have to think about the DB. Rails will create the file silently for you, and you shouldn't be bothered by error messages of any kind (I guess).

Alain

---

<div class="post-metadata">

**Author:** ![isopaleocopria](https://avatars.discourse-cdn.com/v4/letter/i/bb73d2/32.png) [@isopaleocopria](https://discuss.rubyonrails.org/u/isopaleocopria)\
**Post date:** [May 21, 2007, 7:08pm UTC](https://discuss.rubyonrails.org/t/using-rails-without-a-database/13239/3 "2007-05-21T19:08:37Z")

</div>

I did try this in my environment.rb file: \<pre\> &nbsp;&nbsp;&nbsp;&nbsp;config.frameworks -= [:active\_record] \</pre\> This did stop rails from trying to establish a connection to the database, but it also leads to exceptions, since other gems, like active support and railties, have dependencies on ActiveRecord.

---

<div class="post-metadata">

**Author:** ![Alain\_Ravet](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@Alain\_Ravet](https://discuss.rubyonrails.org/u/Alain_Ravet)\
**Post date:** [May 21, 2007, 7:45pm UTC](https://discuss.rubyonrails.org/t/using-rails-without-a-database/13239/4 "2007-05-21T19:45:32Z")

</div>

Isopaleocopria

&nbsp;&nbsp;\> I did try this in my environment.rb file: &nbsp;&nbsp;\> config.frameworks -= [:active\_record] &nbsp;&nbsp;\> .. but it also leads to exceptions, since

Make your life simpler :

file: database.yml
