Empty rails log folder

The rails log folder is in my .gitignore file. That means the log
folder is not in the repository. When I deploy my rails app to the
staging server via git pull, the app refuses to work because it does
not see a log folder. I have to manually create an empty log folder
for it to put log files such as acts_as_ferret log inside. So now I
have to commit an empty log folder to the git repository so that I
don’t have to manually create an empty log folder after a git pull on
the staging server. Is there a better way?

Thanks.

On Tue, Jan 19, 2010 at 7:54 PM, Vincent P [email protected] wrote:

Vincent, you .gitignore should look something like this:

.gitignore:

.DS_Store Note: You should add this line if you’re
working
on Mac OS 10.x
config/database.yml Note: You may or may not want to check your
database.yml into the repositoty.
log/.log
tmp/**/

db/*.sqlite3 Note: You should add this line of you’re
using a
SQLite database

Next, you should do the following:

$ touch log/.gitignore tmp/.gitignore vendor/.gitignore
$ git add .
$ git commit -a -m "

Good luck,

-Conrad

2010/1/20 Vincent P [email protected]:

The rails log folder is in my .gitignore file. Â That means the log
folder is not in the repository. Â When I deploy my rails app to the
staging server via git pull, the app refuses to work because it does
not see a log folder. Â I have to manually create an empty log folder
for it to put log files such as acts_as_ferret log inside. Â So now I
have to commit an empty log folder to the git repository so that I
don’t have to manually create an empty log folder after a git pull on
the staging server. Â Is there a better way?

Instead of using a top level .gitignore to ignore all files in the log
folder (so the folder does not appear in the repository) put a
.gitignore inside the log folder itself to ignore the log files. Then
commit log/.gitignore so the folder appears in the repository.

Colin