things i learned the hard way | IV.
#1
If you are on dreamhost make sure your ssh account is set to use the BASH shell. When you set up a user for ssh/shell access it defaults to tcsh. Switchtower don’t workie with tcsh. choose ’/usr/bash’ in the pull down.
#2
I had to remove my typo install completely from the remote host. I stripped everything out except the base directory of my site. I had imported my site to my svn REPO on my host, applied switchtower to the project locally and then remotely executed the setup script through rake. Here’s the key, the thing I missed and no one mentioned (or maybe they didn’t know), you ssh to your site and export your project from subversion so you get a clean copy of the app. When that is finished then you run ‘rake deploy’ from inside your working copy. For some reason when I deployed over my existing working app the ‘current’ directory/symbolic link became an actual directory and the symbolic links were written inside of it. There was still a ‘public’ directory in there too that was empty, and that is why when I went to my URL I’d get an empty directory listing instead of my application. Every deploy I tried wrote a new symbolic link inside of the ‘current’ directory. I had 19 before I blew them away. Do you know how long it takes to remove 19 releases of a typo app? Approx. 3 hours. Isn’t that a bitch? Anyway, the fresh export took it’s deploy medicine like a big boy and now this here neglected website is back in business.
#3
Did you recently reinstall Ruby? Are you on OS X? Did you compile using gcc 4.0? Are you getting errors from rake not knowing how to execute tasks? Recompile Ruby from source using gcc 3.3 or install from a pre-compiled installer/.dmg. I don’t know the ‘why’ of this one but my gems started playing nice after a recompile/configure/make/make install.
#4
Dreamhost may have you on one machine but be serving you from a network mounted drive. My host machine is ‘egon’ but the shared drive is ‘okeshawasher’. The second one could change so I use ’/home/stranger/svn’ for the path to my subversion repository and ’/home/stranger/wik.inkdeep.com’ for the path to my typo install. If I’m in bash and run ‘pwd’ that is the path it gives me. From tcsh that path is ’/home/.okeshawasher/stranger/svn/’ to my svn repo. I’m slowly learning. Everyday I all of a sudden get why something is the way it is in this mad unix world. I am what is termed a ‘brute force learner’. I smash my brain against an idea over and over and over again until I achieve a little understanding. I know it’s not very agile, but its what I got.
So to recap: Using the wrong shell will fuck everything up. When everything is fucked in this way none of the paths work correctly for calling the reaper script or redirecting to the correct release. Then you end up with 20 releases of your app, none of which will work EVER!
And everyone in the irc RoR room that observed you pleading for help (or a quick, clean death) for 4+ days will set their irc clients to ignore you.
Comments
-
I'm glad it finally worked for you! I've linked to this post from my Dreamhost Switchtower page.
-
Yeah thanks for this. I also have a personal DreamHost QuickStart guide posted on www.HostingRails.com which might be of interest to people here as well. Cheers, ~William