# DB in Non-Standard Place

**URL:** <https://www.ruby-forum.com/t/db-in-non-standard-place/185222>\
**Category:** Rails\
**Created:** [March 16, 2010, 11:16am UTC](https://www.ruby-forum.com/t/db-in-non-standard-place/185222 "2010-03-16T11:16:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [March 16, 2010, 11:16am UTC](https://www.ruby-forum.com/t/db-in-non-standard-place/185222/1 "2010-03-16T11:16:43Z")

</div>

I’ll be doing a deployment soon and looking ahead to the future, I was  
wondering what people do with regarding putting a SQLite db in a non  
standard place.

The simplest solution to get it out of the app is to move it to another  
directory and have rails find it at server startup. Where can I put ruby  
code to prepend an absolute path to the :database entry in  
config/database.yml.? The absolute path to the database will be  
different  
from the machine where the application is being developed.

Has anyone played with putting a SQLite DB on cloud? I was thinking of  
putting it on UbuntuOne so that the user (my sister) would have access  
to  
the DB from her local machine should the host hosting the rails app ever  
go  
down.

The reason for my question is simple, when deploying upgrades, I deploy  
the  
whole application and not incremental changes.

CIA

-Ants

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [March 16, 2010, 12:48pm UTC](https://www.ruby-forum.com/t/db-in-non-standard-place/185222/2 "2010-03-16T12:48:02Z")

</div>

On Mar 16, 10:15 am, Anthony G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I’ll be doing a deployment soon and looking ahead to the future, I was  
> wondering what people do with regarding putting a SQLite db in a non  
> standard place.
> 
> The simplest solution to get it out of the app is to move it to another  
> directory and have rails find it at server startup. Where can I put ruby  
> code to prepend an absolute path to the :database entry in  
> config/database.yml.? The absolute path to the database will be different  
> from the machine where the application is being developed.

Add a symlink to the db file upon deploy?

Fred

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [March 16, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/db-in-non-standard-place/185222/3 "2010-03-16T14:41:01Z")

</div>

On 16 March 2010 10:15, Anthony G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> I’ll be doing a deployment soon and looking ahead to the future, I was  
> wondering what people do with regarding putting a SQLite db in a non  
> standard place.

I believe that sqlite is not recommended for production.

Colin
