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 trialMike 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.
development:
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
Treehouse Guest TeacherHey 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.