Revert "Revert "Add gitignore file for rails specific files.""

This reverts commit 49a8981dc753673495524ca8630146d0db15367c.

No. You will not remove the gitignore file.
Update .gitattributes

Make sure image files are treated as binary.
Renormalize line endings for two layout files.