我希望能够在Windows 7上创建rakefile,我可以用rake -g <taskname>
或rake --system <taskname>
命令调用。我在哪里保存rakefile?我已经尝试在我的用户目录(c:\ users \ me \ rake)下创建一个Rake目录,但是当我拨打rake -g hello_world
时,耙出错误说它不知道如何构建:hello_world
任务,这让我觉得它只是看不到rakefile。这里是我的全球Rake文件是什么样子:如何在Windows 7上创建全局rakefile?
require 'rake'
desc "a hello world task"
task :hello_world do
puts "hello from your global rakefile"
end
如果它不知道如何构建任务,那就意味着rake会看到rakefile。所以告诉我们你的rakefile – 2011-03-11 21:52:59