I have an idea for a Rails application. After reading countless books I feel that I have to make some attempt at getting my hands dirty. Capistrano is something that I’ve heard of and, from the looks of things, would be good to know and would make depolying and updates easier in the long run. But, from what I’ve read, it can only use a remote Subversion code repository and not a local one. That was a problem. Should I pay for webhosting, my current provider doesn’t supply Subversion as an option, or should I use an external company who would host the code, like we use at work. There was a plan B, or C in this case, and that was to switch webhosts. So I signed up for an account with Textdrive. Everything went great I moved my domains over, except this one, and setup FTP and email accounts. I didn’t move this, my main domain, because I wanted to move from Wordpress to Mephisto as a blogging engine. Mephisto is written using Rails, which I of course know a bit about now and Wordpress is based on PHP. I made a few little tweaks to the Wordpress code but nothing major.
In the meantime I started a little fansite for my uncle, Sir Les Patterson, which I wrote using PHP but only so that I could include things like the navigation and the footer into each page. So I decided to convert SirLesPatterson.com to Mephisto. There was only about 6 pages to the entire site but at least it would be a good test to get used to the liquid templates, the software and setting it up in a hosted environment. This all went very well and it is still running fine as I write. The week after I set it all up it stopped working, yet I could access the site using the port number that I had been given. There must have just been a problem with the proxy. A month after I was adding content to the site when every admininistration page and every web page started to return 500 errors. At the time I couldn’t figure out what the problem was. The lighttpd webserver process was running but thinking about it now it could have been because the Rails process itself wasn’t running. So the site was down for a day or two. Textdrive didn’t reply to my support ticket, which didn’t fill me with much confidence. At least if I controlled my own server I would be more in control.
So, I have put my name down for a VPS at Slicehost. Not knowing all that much about how a hosting server is setup this will be a learning experience if nothing else.
It was at this time that I heard about Google Apps for domains. You could setup your domains to use Gmail instead of setting up mail software on your server. Brilliant! So I registered, setup the domains, changed the MX records and waited. And waited. Then Google Apps returned an error saying that the setup wasn’t correct and that I should check the setup instructions again. Which I did. What I hadn’t seen was that at the top of the DNS page it said that I needed to switch nameservers for these changes to work. This would mean moving them from my current hosts back to 123-reg and loosing my current email and web traffic. Luckily I have a domain that I’m not currently using so I tried it. Yes, the Gmail account for the domain worked perfectly but the web traffic was just pointing back to a 123-reg holding page. Far from ideal. I scanned through the Google Groups posts and promptly gave up. It would have been perfect having Google handle the email traffic so that I could tinker with the web server to my hearts content without loosing correspondence.
So I still have this site to move from Bluehost to Textdrive. And from Wordpress to Mephisto.
I spent a couple of days over the weekend adding extra bits and pieces to the Wordpress conversion script. I created a liquid template similar to the current theme but with a sidebar on the right. Running everything locally it worked fine. I had to change some of the content because it still contained some HTML tags that was confusing Markdown. Redirects to the sections in Pages worked fine and I tinkered with the layout and the style a little bit more. I copied it all to Textdrive, setup the database, setup the Rails process, setup lighttpd and added another backup script to the cron job. Accessed a couple of the pages and it all worked well… until it started to display an error page. The page is the standard Mephisto one which is shown to hide the full log trace from the surfer. With the terminal window open the cause was apparent. I could browse some of the pages but occasionally an ‘Out of memory’ error would be displayed in the window. Running two Rails processes on one shared host seemed like a feasible setup at the time. But not in practice. One of them had to go.
This blog is now back to running Wordpress. SirLesPatterson.com is still running on Mephisto. If that gives me any trouble I’ll switch that back to static PHP pages instead.
To be honest I would of had to change, or create plugins for Mephisto to get it to do what I already have in Wordpress: automatic stylesheet switching and sitemap generation being the main ones. I could have written Ruby code to do things like that and added extra sections to the site using API’s.
Time spent… days and days. Progress made… zero. But at least I know more about setting up Rails and lighttpd than when I started.