Switchtower to deploy CrossConnector – Huge Server Slow Down Time
Last week I was setting up the wonderful Switchtower to deploy CrossConnector. But for the life of me, I couldn’t get it to work. It kept giving me an inexplicable runtime error whenever I would run rake deploy.
I combed over my setup for hours, trying to find that little missing piece of the puzzle. Was it my configuration? My deployment recipe? Was I using the wrong version of something?
Finally, in desperation, I contacted Jamis Buck, the author of Switchtower. Jamis got back to me within a few minutes with a very helpful tip: check your UNIX shell. Apparently the POSIX conditional syntax used by the Switchtower commands is incompatible with TCSH and certain other shells. Turns out I was using TCSH. I switched my shell to BASH and all of a sudden everything worked – amazing!
So the gotcha is: if you’re getting a runtime error with Switchtower, try changing your shell to BASH or some other shell that supports POSIX commands. It’s a huge pain especially if you’re using a cheap server, my friend Lucas described his experience pretty well here.