Upgrading to Mephisto 0.8.1
January 14th, 2009
Last month Mephisto 0.8.1: Drax was relaunched. Seeing activity on Mephisto was great news in itself. The update includes support for Rails 2.2.2 and several significant security fixes. The release is considered experimental but important because of the security fixes. That's a bit of a mixed message but I have no financial stake in my blog so decided to do an update.
This post describes my update process. It provides some general information about the changes and provides an example of using interactive git rebasing but in most cases it won't be a cookie cutter approach that you can follow for your own Mephisto implementation. In gitting Started with Mephisto and other posts I've described how I set-up Mephisto 0.8. Unless you've followed along and are maintaining Mephisto in the same way, or at least maintain your Mephisto blog in a git repository with customizations in your own branch, then your update procedure will probably be significantly different. Read the rest of this entry
Updating Gmail SSL SMTP Support for Ruby 1.8.7
January 13th, 2009
In Adding Gmail SSL SMTP Support to Rails I described the use of a simple Rails plugin to provide SSL SMTP support. Today I upgraded to a new version of Mephisto and while testing it in production I discovered that I couldn't send emails. It turns out that it had nothing to do with the Mephisto upgrade; my DreamHost server had been updated to Ruby 1.8.7 and the action_mailer_tls plugin I was using wasn't compatible. Oh well, I guess I deserved that surprise for using shared hosting and adding a monkey patch plugin. This post describes a simple fix. Read the rest of this entry
Adding Gmail SSL SMTP Support to Rails
December 4th, 2008
Jan. 13, 2009 Update: If you're using Ruby 1.8.7 see Updating Gmail SSL SMTP Support for Ruby 1.8.7 for a compatibility fix to the plugin used in this post.
DreamHost provides it's own SMTP support but their default set-up uses Gmail, which only supports SSL based SMTP connections. Rails 2.2 with Ruby 1.9 provides SSL support in ActionMailer via Ruby's 1.9 Net::SMTP class. That's great but it's still a very new combination and I wanted support for DreamHost's Ruby 1.8.5 and Mephisto using Rails 2.0.2. Fortunately it's simple to get SSL (a.k.a. TLS) based SMTP connections to work. Within a few minutes of hitting the browser search button I saw three options: lift 1.9 Net::SMTP code, use msmtp, and, the method I chose, a small plugin that patches Net::SMTP. No, I didn't look into the merits of each solution and I didn't do any type of exhaustive search to see what else might be available, I just picked what looked like an easy way to get the job done. This post documents where to find the plugin and how to use it. Read the rest of this entry
Cached Externals
December 3rd, 2008
Jan. 14, 2009 Update: The techniques discussed in this post are still relevant but the externals only apply to Mephisto 0.8. See Upgrading to Mephisto 0.8.1 for information about the externals that I'm currently caching.
Cached Externals is a Rails plugin that extends Capistrano to speed up deployments by not deploying vendor gems and plugins unless they change. The way it accomplishes the performance gain also results in explicit management of the cached gems and plugins, something worthwhile in it's own right. In this this post I'll walk you through installation and use of the plugin by describing how I used it for this Mephisto blog application. gitting Started with Mephisto describes how the application was set-up and Deploying Mephisto with Capistrano to DreamHost provides the pre-Cached Externals deployment details. Basically the app is just a customized copy of Mephisto in a git repository. The vendor directory holds Rails 2.0.2 and TZInfo along with all the gems and plugins that are part of the Mephisto distribution. The repository is kept locally on a laptop so Capistrano's copy strategy is used to deploy it to the production server. Read the rest of this entry
Production Data to Development
December 1st, 2008
It's often helpful to be able to bring MySQL production data down to a development machine. I wanted to do this for my Mephisto blog engine (see gitting Started with Mephisto and Deploying Mephisto with Capistrano to DreamHost) so that I could see how changes would look with existing data before deploying an update. Production data is also useful for tracking down bugs with production data and for backups. This post describes the Capistrano namespace I created for doing this. Read the rest of this entry
Deploying Mephisto with Capistrano to DreamHost
November 30th, 2008
This post describes how to use Capistrano to deploy a Mephisto based blogging engine to a DreamHost account running Phusion Passenger. The blog code is deployed from a local git repository. gitting Started with Mephisto describes how the repository was set-up. With some modifications the script and commands presented here should be adaptable to other hosting services and other Phusion based Rails applications. Read the rest of this entry
gitting Started with Mephisto
November 30th, 2008
Jan. 14, 2009 Update: This post applies to Mephisto 0.8. See Upgrading to Mephisto 0.8.1 for information about moving to version 0.8.1
I took what I bet is a pretty common approach to setting up Mephisto. I put a copy on my laptop, played with it just enough to get it to work and then found and followed some fairly simple instructions to install it directly on my DreamHost account. It was an easy and straight forward approach but in my case by the time I finished my installation I knew I wanted to start over. The problem was that I quickly found myself modifying too many things to get Mephisto to work and look the way I wanted. I could tell it was going to be easier for me in the long run to get the blog engine in source code control with a development and deployment environment that made it to easy tweak and update from my laptop. Since Mephisto is a Rails application I went with the common choices: maintaining the blog code in a local git repository and deploying it using Capistrano.
In this post I cover setting up a custom git branch for Mephisto along with a couple of Mephisto modifications I recommend to prepare it for deployment to a DreamHost account. Actually there's really nothing DreamHost specific here but other hosting services could require additional changes to environment files. I'll cover deployment to DreamHost using Capistrano in a my next post. If you want to take this approach then I'm assuming you're fairly technical and already have git and Rails and MySQL installed on your computer. The use of git and Rails in this post is basic but going down this maintenance and deployment path is only worthwhile if you're reasonably comfortable with both technologies. Read the rest of this entry
SSH with Leopard
November 29th, 2008
I recently set-up a secure shell account for a DreamHost shared hosting account that I intend to use for automating deployment and backup tasks from a Mac OS X Leopard client. While not overly complicated there were a couple of gotchas that I ran into. This post consolidates my findings and gives you a brief background for what's going on when you set up SSH access. The information applies to Mac OS X 10.5.1 or greater. Read the rest of this entry