Mac上的Rakefile长鳍金枪鱼

时间:2013-08-07 16:05:05

标签: ruby mono rake

我在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)

1 个答案:

答案 0 :(得分:1)

这听起来像是你的GEM_HOME与LOAD_PATH的问题。有几种方法可以诊断和修复确切的问题in this question