我在 Windows 上遇到 Vlad 问题。打电话后rake vlad:deploy
我得到以下信息:
uninitialized constant Fcntl::F_SETFD
谷歌搜索了一段时间后,我发现 open4 gem 存在不适合 Windows 的问题,我应该改用 popen4 gem。我安装了它,但没有任何改变。
如何强制 vlad 使用 popen4 而不是 open4?
我在 Windows 上遇到 Vlad 问题。打电话后rake vlad:deploy
我得到以下信息:
uninitialized constant Fcntl::F_SETFD
谷歌搜索了一段时间后,我发现 open4 gem 存在不适合 Windows 的问题,我应该改用 popen4 gem。我安装了它,但没有任何改变。
如何强制 vlad 使用 popen4 而不是 open4?
Vlad和Capistrano不适用于Microsoft Windows系统。即使你设法让它在Windows下运行,你也会发现新的限制。这些工具只是用于自动化SCM / SSH / SFTP任务的很好的包装器( rake任务) 。我知道Capistrano使用xcopy.exe远程部署文件,但它不如rsync或scp强大。
如果您仍然感兴趣,open4依赖项在源代码上是硬编码的,使其运行的唯一方法是破解代码。
http://hitsquad.rubyforge.org/svn/vlad/2.0.0/lib/rake_remote_task.rb
...
require 'open4'
...
##
# Rake::RemoteTask is a subclass of Rake::Task that adds
# remote_actions that execute in parallel on multiple hosts via ssh.
class Rake::RemoteTask < Rake::Task
@@current_roles = []
include Open4
...
By the way, using Capistrano will simplify you life but as advertised do not expect to take full Capistrano potential as it has minor support.
I was able to get capistrano working against a windows 2008 r2 box running Cygwin's sshd as a service, but not vlad's remote_task. I wonder if remote_task can be ported to use Ruby's Net::SSH instead?
What I haven't been able to do is get windows to allow me to authenticate via public keys instead of passwords...