我已经在我的 PC 上使用 RakeFile 很长时间了。刚刚切换到Mac。我想用相同的 rake 文件执行一些单声道 exe 文件,但它甚至不会在 mac 上运行。我跑了gem install albacore
,但它似乎没有正常工作。请指教。
当我尝试运行它时出现此错误:
rake aborted!
no such file to load -- albacore
这是我的 rake 文件的开头:
require 'albacore'
require 'rubygems'
require 'ftools'
....
class Exec
include RunCommand
include YAMLConfig
include Logging
def initialize
@path_to_command=''
@parameters = []
super()
end
def execute
result = run_command "Exec", ""
failure_message = 'Exec Failed. See Build Log For Detail'
fail_with_message failure_message if !result
end
end
更新:各种控制台输出
Chris@mbp
$ sudo gem install albacore
Password:
Successfully installed albacore-0.3.5
1 gem installed
Installing ri documentation for albacore-0.3.5...
Installing RDoc documentation for albacore-0.3.5...
Chris@mbp
$ rake database:Sandbox
(in /Users/Chris/projects/DFT)
rake aborted!
no such file to load -- albacore
/Users/Chris/projects/DFT/rakefile:1:in `require'
(See full trace by running task with --trace)
Chris@mbp
$ gem list
*** LOCAL GEMS ***
albacore (0.3.5)
rubyzip (0.9.9)