Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Mike White
Mike White
23,234 Points

[Rails] Moving from Cloud9 IDE to my local machine and was missing my config/database.yml file.

I've been following along with the Build a Simple Ruby on Rails Application and was using the Cloud9 IDE. I decided I wanted to move the whole application onto my laptop to run locally. Using BitBucket for my repository, I cloned the application into my sites directory and tried to create my database.

rake db:create:all
rake aborted!
No such file or directory - /Users/myquite/Sites/treebook/config/database.yml

Turns out, and I'm not entirely sure why, that there was no config/database.yml file in my project.

So I had to create the database.yml file in the config directory using some info I found on the RubyonRails site.

  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

Once I'd save the config/database.yml file I was able to create and migrate the database and run the server.

It took way longer to figure out than it should have but I hope if anyone else finds themselves in a similar predicament hopefully this will help.

1 Answer

Jason Seifer
Jason Seifer
Treehouse Guest Teacher

Hey Mike, thanks for the info! The reason that the config/database.yml wasn't present when you cloned it is because it's ignored in git by default. This is for security purposes so that database credentials are checked in to source control.