From my experience, the Linux shebang lines work fine on Windows, as Windows
doesn’t use this line at all.
I do have to run the server like this on Windows:
ruby script\server
Whereas, on Linux, the command would be:
script/server
So, the wiki is wrong - have SVN get the dispatch.fcgi file and change
the
first line to be your Linux shebang for your Ruby interpreter.
From: [email protected]
[mailto:[email protected]] On Behalf Of Matt W.
Sent: Wednesday, January 04, 2006 7:31 PM
To: [email protected]
Subject: Re: [Rails] switchtower, windows and dispatch.fcgi
I have a further question about this… I’m still trying to get my head
around all of the deployment and SVN stuff.
My situation is that I’m developing on Windows and deploying on a Debian
VPS. Up to now I’ve been deploying straight out of SVN, but I’d like to
move
to Switchtower. I’ve successfully gotten all of the install tasks done,
and
I’ve run the REMOTE_EXEC setup task successfully. I had to do Tom’s
propset
suggestion on the spinner/spawner/reaper tasks because the scripts were
coming out as non-executable and with the wrong line-endings. This
worked,
and those scripts now execute.
One last problem remains… I followed the advice of an article in the
Rails
Wiki about how to set SVN to ignore dispatch.fcgi so that I didn’t
constantly have to update my shebang lines when I switch between
development
in Windows and deployment on Linux. (c:\ruby\bin\ruby vs
/usr/local/bin/ruby) As such, the SVN export performed from Switchtower
doesn’t export a dispatch.fcgi file in deployment. Thus, my
current/public
dir has no dispatch.fcgi file. Not good.
Does anyone else have a better idea for how to deal with this issue? My
feeble mind just can’t seem to come up with a good way of dealing with
the
shebang conflict/SVN/deployment issue. How can I get Switchtower to
include
a dispatch.fcgi file without messing it up with the copy I use in
development that references the Windows Ruby location?
Thanks, all!
I needed to set EOL style to make it work, in addition to the executable
property.