danbartlett/opensit — pull request #25 by JohnKellyFerguson (2013-09-14 01:04:09+00:00)
Title: Update Database and Gemfile Settings to more easily work with other contributors

After forking the repo, I had difficulty getting my database set up to work properly. The settings hardcoded in the database.yml file weren't properly configured for my machine, so I created a database.example.yml file to provide more info and the basic skeleton settings and instructions on how to configure the database for each developer's machine.

I then created a regular database.yml file with my correct settings and added it to the gitignore file. This is so other developers can create their own settings. The only issue with having a gitignored database.yml file is that it won't be included when you deploy.

To remedy this, I set up a Capistrano task that will symlink the database.yml file from the shared directory to the current directory. At first, there won't be a database.yml file in production, so secure copy will be necessary to get it up there. To do so, a command like the following will work:

`scp config/database.yml user@my_server.com:/path_to_rails_app/shared/config/database.yml`

There's more info at the following [link](http://stackoverflow.com/questions/1449836/how-to-manage-rails-database-yml) about working with a gitignored database.yml.

Lastly, I update the gemfile so 'rb-inotify' doesn't interfere with people developing on OS X. I also added the OS X equivalent notifier gem.