On Thu, Sep 8, 2011 at 4:13 PM, Mr. Puneet Kishor
<punk.kish@gmail.com> wrote:
On Sep 8, 2011, at 6:10 PM, David Precious wrote:
> On Friday 09 September 2011 00:07:51 Mr. Puneet Kishor wrote:
>> On Sep 8, 2011, at 1:02 PM, David Precious wrote:
>>> I would be inclined to simply put the database config into
>>> environments/production.yml, and not commit that file.
>>>
>>> So, non-sensitive app config goes in config.yml, but the sensitive stuff
>>> is not included.
>>>
>>
>> Well, that is not a good option, because that way other users who clone the
>> repo don't get everything to make the project work. They will need to
>> perform a separate step to recreate production.yml.
>
> Well, they're presumably going to have to set up a database, then put the
> appropriate connection details into the config file, no?
>
>
indeed, but the config file may be fairly complex (containing not just the db -- the sensitive -- params but also various other params). Giving the entire YMLs, for both environments, would be a complete repo.
I've done it like this in the past... ship a file called
production.yml-default which contains all the keys and dummy values for
the sensitive stuff. As part of the instructions they rename it to
remove the -default part of the filename. They fill out their stuff.
There's svn:ignore it git:ignore that ignores the "real" .yml file so
you don't have to worry about it getting checked in.
Puneet.