# Rails without a database

**URL:** <https://www.ruby-forum.com/t/rails-without-a-database/173835>\
**Category:** Rails\
**Created:** [August 16, 2009, 10:11am UTC](https://www.ruby-forum.com/t/rails-without-a-database/173835 "2009-08-16T10:11:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![orangea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c67d28/32.png) [@orangea](https://www.ruby-forum.com/u/orangea)\
**Post date:** [August 16, 2009, 10:11am UTC](https://www.ruby-forum.com/t/rails-without-a-database/173835/1 "2009-08-16T10:11:52Z")

</div>

Hello! I can’t find a way to have rails not use a database. I just  
left my database.yml file as it is. When I run my rails application  
that has no models, my browser says that it couldn’t connect to a  
database. In environment.rb I uncommented the line  
config.frameworks -=  
[:active\_record, :active\_resource, :action\_mailer]  
but then Webrick won’t start. Sorry if this has already been posted or  
the solution is really simple, I couldn’t find anything after about a  
half hour of searching and I’ve only been using rails for a few days.  
Thanks!

---

<div class="post-metadata">

**Author:** ![orangea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c67d28/32.png) [@orangea](https://www.ruby-forum.com/u/orangea)\
**Post date:** [August 16, 2009, 10:17am UTC](https://www.ruby-forum.com/t/rails-without-a-database/173835/2 "2009-08-16T10:17:43Z")

</div>

On Aug 16, 4:03 am, orangea [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello! I can’t find a way to have rails not use a database. I just  
> left my database.yml file as it is. When I run my rails application  
> that has no models, my browser says that it couldn’t connect to a  
> database. In environment.rb I uncommented the line  
> config.frameworks -=  
> [:active\_record, :active\_resource, :action\_mailer]

That is about it but you need to also remove any other reference to  
those frameworks (eg in the config files or in the initializers)

Fred

---

<div class="post-metadata">

**Author:** ![orangea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c67d28/32.png) [@orangea](https://www.ruby-forum.com/u/orangea)\
**Post date:** [August 16, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/rails-without-a-database/173835/3 "2009-08-16T21:42:32Z")

</div>

Thanks for responding! Since I am new to rails, could you tell me  
where the references are in the config files or initializers that I  
should remove? I didn’t add any references myself. Also, I don’t  
really need to get rid of active resource or action mailer, but I am  
unsure if it is necessary. If I changed the line to  
config.frameworks -= [:active\_record]  
would it be easier to remove active record or do active resource and  
action mailer rely on it?

On Aug 16, 1:17 am, Frederick C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![orangea](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/c67d28/32.png) [@orangea](https://www.ruby-forum.com/u/orangea)\
**Post date:** [August 16, 2009, 9:56pm UTC](https://www.ruby-forum.com/t/rails-without-a-database/173835/4 "2009-08-16T21:56:00Z")

</div>

On Aug 16, 8:41 pm, orangea [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks for responding! Since I am new to rails, could you tell me  
> where the references are in the config files or initializers that I  
> should remove? I didn’t add any references myself.

Anything that mentions any of the frameworks you are disabling, eg  
there are some that setup actionmailer.

> Also, I don’t  
> really need to get rid of active resource or action mailer, but I am  
> unsure if it is necessary. If I changed the line to  
> config.frameworks -= [:active\_record]  
> would it be easier to remove active record or do active resource and  
> action mailer rely on it?

they don’t

Fred
