I understand that Rake is a DSL and a subset of Ruby. I realize I have to create Rakefile
as the entrypoint (surprisingly Rakefile.rake is not an option). In this rakefile I may include references to other *.rake, *.rb files:
load './file1.rake'
#require './file1.rake' #Why does this fail?
require './file2'
task 'a' => ['rakeFile', 'rbFile'] do
puts 'helo wurld'
end
task 'b' => ['rbFile'] do
puts 'helo wurld'
end
require
seems to be unable to handle *.rake files. This seems problematic. I don't understand why I should use *.rake file extensions. When programming in Rake, I can't use require
with *.rake, and *.rb seems to work just fine...what benefit does using *.rake have over *.rb?