Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created a new Rails app using version 3.0.1 (in order to follow along with a tutorial using 3.0.1), but it didn't create a gitignore file. If I create my own, what ending should I put on the file? is it an rb file? or can you explain why it might not have created this file?

share|improve this question

4 Answers 4

up vote 3 down vote accepted

It isn't a ruby file. It is simply a list of files or directories to ignore. Simply create a file called .gitignore. There is no extension.

share|improve this answer
    
but rails creates the file automaticall –  Michael Nov 14 '11 at 5:16
1  
What are you talking about? You just said "but it didn't create a gitignore file" –  bigbadonk420 Jun 13 '13 at 11:11

.gitignore is a file used by Git version control system. It has nothing to do with Ruby and you don't need to create it unless your project uses Git as a version control system. Here is more info about gitignore if you are interested: http://gitready.com/beginner/2009/01/19/ignoring-files.html

share|improve this answer

Michael, I thought I had this issue too; maybe rails is creating the file, but it is just hidden. Make sure you are seeing all the hidden files; on Ubuntu, when the folder where your other rails folders appeared, enter Ctrl + H to toggle files being hidden/unhidden.

share|improve this answer
1  
This is true. .gitignore is a dotfile, therefor hidden by the file manager. –  iglvzx Jan 26 '12 at 8:30

I am new for Ruby on Rails. I did not have .gitignore file because is hidden. To open it on your text editor go to root dir and type .gitignore and will come out on your text editor.Good luck

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.