# Database setup with 2 language

**URL:** <https://discuss.circleci.com/t/database-setup-with-2-language/27134>\
**Category:** Build Environment\
**Tags:** ruby, postgresql, golang\
**Created:** [December 13, 2018, 12:24pm UTC](https://discuss.circleci.com/t/database-setup-with-2-language/27134 "2018-12-13T12:24:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GalGavu](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@GalGavu](https://discuss.circleci.com/u/GalGavu)\
**Post date:** [December 13, 2018, 12:24pm UTC](https://discuss.circleci.com/t/database-setup-with-2-language/27134/1 "2018-12-13T12:24:35Z")

</div>

Hi,  
I’m using mainly two languages in my dev stack: ruby and golang. I’m setting up database with ruby and I’m using this database (postgresql) on both ruby and golang.  
Ruby side:  
With setting up circleCi for ruby repo I have no problems - I can easily spin up database with `rake db:create` and `rake db:migrate` and run tests there.  
Golang side:  
I have no idea how to properly setup circleCi so that ruby would setup database for tests for me and then I could use golang to work with that db.

The only solution I’m seeing right now is to use custom image but maybe there is a way to setup db with ruby and then use that db with golang image? Let me know 🙂

---

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [December 23, 2018, 10:26pm UTC](https://discuss.circleci.com/t/database-setup-with-2-language/27134/2 "2018-12-23T22:26:34Z")

</div>

> [@GalGavu](#):
>
> With setting up circleCi for ruby repo I have no problems - I can easily spin up database with `rake db:create` and `rake db:migrate` and run tests there.

This step does not do anything ruby specific, its just making a DB and loading up the schema.

On the go side, you should be able to connect to the same exact database that was created in your ruby step using a connection URL that refers to the docker image that you are using for your db.

If you share your entire config we can give you some more pointers.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [March 23, 2019, 10:40pm UTC](https://discuss.circleci.com/t/database-setup-with-2-language/27134/3 "2019-03-23T22:40:44Z")

</div>

Closed on March 23, 2019, 10:40pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
