Ruby Mac上的Rakefile Albacore
我在电脑上使用RakeFile已经有很长时间了。刚刚切换到Mac。我想用相同的rake文件执行一些mono-exe文件,但它甚至不能在mac上运行。 我运行了Ruby Mac上的Rakefile Albacore,ruby,mono,rake,Ruby,Mono,Rake,我在电脑上使用RakeFile已经有很长时间了。刚刚切换到Mac。我想用相同的rake文件执行一些mono-exe文件,但它甚至不能在mac上运行。 我运行了gem安装albacore,但它似乎工作不正常。请告知 我在尝试运行时遇到此错误: rake aborted! no such file to load -- albacore 以下是我的rake文件的开头: require 'albacore' require 'rubygems' require 'ftools' .... c
gem安装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)
这听起来像是GEM\u HOME与LOAD\u路径之间的问题。有几种方法可以诊断和修复确切的问题。当您说gem安装似乎无法正常工作时,您是否收到任何错误消息?如果你做了
gem列表
,你会看到albacore吗?您是否使用了任何ruby版本管理器,如rvm、rbenv或chruby?你在用bundler吗?当您试图运行rake文件并使rake中止时,您使用的是什么命令?@carolinet我已经用输出更新了我的问题。