views:

306

answers:

3

Hi,

I am having a problem with Vlad on windows. After calling rake vlad:deploy I am getting the following: uninitialized constant Fcntl::F_SETFD

After googling for a while I figured out that there is problem with open4 gem that is not suitable for Windows and I should use popen4 gem instead. I installed it but nothing has changed.

How can I force vlad to use popen4 instead of open4?

+1  A: 

I haven't worked on it . Some of the resources which may help you to solve your problem.

open4 will not work on Windows -- it is a Unix only library.For Windows there is popen4.

popen4 for windows

It does the same thing ... but for Windows. Be forewarned that the possibility of blocking the program on a full pipe is very possible on the Windows platform.

Discussions here

Hope this helps !

YetAnotherCoder
+1  A: 

Vlad and Capistrano are not intended for Microsoft Windows systems. Even if you manage to get it running under Windows you will find new limitations. These tools are just nice wrappers (rake tasks) for automating SCM/SSH/SFTP tasks. I know Capistrano uses xcopy.exe to remotely deploy files but it is't as powerful as rsync or scp.

If you are still interested, open4 dependencies are hardcoded on the source, the only way to get it running is by hacking the code.

http://hitsquad.rubyforge.org/svn/vlad/2.0.0/lib/rake%5Fremote%5Ftask.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.

knoopx
A: 

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...

Peter Mounce