Skip to content
Browse files

Add comments to our generated .gitignore, including a note about when…

… to use a global gitignore. Remove .sass-cache since we use /tmp/sass-cache, which is already ignored.
  • Loading branch information...
1 parent 96e1dc3 commit 1851791803e58dfa19dfe1cb686cf5870e655b27 @jeremy jeremy committed
Showing with 15 additions and 5 deletions.
  1. +15 −5 railties/lib/rails/generators/rails/app/templates/gitignore
View
20 railties/lib/rails/generators/rails/app/templates/gitignore
@@ -1,5 +1,15 @@
-.bundle
-db/*.sqlite3
-log/*.log
-tmp/
-.sass-cache/
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp

1 comment on commit 1851791

@kennyj

@jeremy

I'm testing rails 3.1.2.rc2 (with centos5.6 x64, ruby1.9.3-p0, sass-3.1.10, sass-rails-3.1.5.rc2).
You said "Remove .sass-cache since we use /tmp/sass-cache, which is already ignored." in the commit message, but I found Rails.root + ".sass-cache" directory after live compiling. Is this expected behavior?

My reproduction way.

1) rails new demo

2) cd demo

3) edit config/environments/production.rb

config.assets.compile = true

4) rails g scaffold User email:string

5) rake db:migrate RAILS_ENV=production

6) rails s -e production

7) browse http://localhost:3000/users

8) Ctrl + C

9) ls -la

drwxrwxr-x 14 kennyj kennyj 4096 11月 18 02:11 .
drwxrwxr-x  3 kennyj kennyj 4096 11月 18 02:07 ..
-rw-rw-r--  1 kennyj kennyj  430 11月 18 02:07 .gitignore
drwxrwxr-x  3 kennyj kennyj 4096 11月 18 02:11 .sass-cache ★
-rw-rw-r--  1 kennyj kennyj  720 11月 18 02:07 Gemfile
-rw-rw-r--  1 kennyj kennyj 2702 11月 18 02:08 Gemfile.lock
...
Please sign in to comment.
Something went wrong with that request. Please try again.