Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Taylor Quinn
Taylor Quinn
20,003 Points

Working in teams help

A buddy and I are working on a simple rails website with a couple pages and a database that stores mostly login information. My question is how can both of us work on this project using local databases? I have put the project on git hub and he cloned it but we can not seem to get the cloned project to connect to mysql. We tried bundle install and then rake db:migrate but that still didn't work. Any suggestions or better methods to do this?

1 Answer

Tim Knight
Tim Knight
28,888 Points

Taylor,

This might seem like a stupid question, but how exactly are you setting up your MySQL configuration within your code base? Typically if you're all working locally I would suggest removing your database.yml file from git if you're committed it and instead commit a database.example.yml which doesn't have your user accounts within the configuration. Then add your database.yml file to you .gitignore. Each of you should be creating your own database.yml configuration file with your local access information. You'll then need to remember to run the latest migrations to the database whenever you pull code.

As you get finished with your project and you're making less database schema changes I would suggest moving your database to a staging database that you both access remotely.