More Structure
Goals
- Add another file to our repository
Now add a Rakefile
This lab assumes you have installed rake. Please do that before continuing. Check for your specific Operating System. Otherwise execute:
Execute:
gem install rake
Let’s add a Rakefile to our repository. The following one will do nicely.
Rakefile
#!/usr/bin/ruby -wKU
task :default => :run
task :run do
require './lib/hello'
end
Add and commit the change.
Execute:
git add Rakefile
git commit -m "Added a Rakefile."
You should be able to use Rake to run your hello program now.
Execute:
rake
Output:
$ rake
Hello, World!
当前内容版权归 gitimmersion 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 gitimmersion .