.rake files and text editors
I'm trying to follow a Ruby on Rails tutorial by Michael hartl and he creates a sample_data.rake file for the Faker gem to create sample data and users. The problem is that this file doesn't show in the directory of files when I open the application in TextWrangler, and then when I force it open using TextWrangler, the text on the file is all black whereas normally programming language on开发者_运维技巧 a TextWrangler file will be different colors.
Is there something special about files ending .rake?
I'm such a lost newbie that I don't even really know if the functions it's running are working, so I'm a bit worried that I might be doing something wrong...
You can tell your editor to treat .rake
files as regular Ruby files. There is nothing special about rakefiles. The only reason the extension is different is to indicate that it should be run with the rake
-command, not as plain ruby.
I don't know how to do that in TextWrangler, but there should be an option to set the file type.
精彩评论