blog.erik.rainey.name

Sating the digital medium with semi-intelligible filler.

Yet Another Typo Upgrade, Yet Another Trip to the MySQL Admin Page

Posted by Erik Rainey Mon, 08 Sep 2008 02:58:00 GMT

I just upgraded this blog to Typo-5.1.3. Here's a short description of the two night escapade that was. I install typo (copying the database.yml and other configs) and point the symbolic link I have for the domain to it, everything stops working. Fine, I know they probably updated some tables so I wasn't expecting that to work. So I run:

$ rake db:migrate

Thinking that will fix it. Nope. That doesn't even run. Why? Well there were lots of errors and what-not but after some research and having to read the code, I found out that Typo-5.1.3 thought I had to have a frozen version of Rails in my vendor/rails. However, I just installed it, so of course I don't. So I get rid of vendor/rails:

$ rm -rf vendor/rails

Now I run:

$ rake db:migrate

And failure. After some more reading I learn that Dreamhost decided to update itself to Rails 2.1.0 which is, of course, incompatible with this version of Typo. Great. Now I do have to have a frozen version of Rails. Now I have my own gems on Dreamhost, so I think, no problem, I'll just move it over to that. 

$ rails -v

Rails 2.1.0

Great, it's not even in my gems. So I wget all the Rails 2.0.2 parts (remember the Ruby-Killer on Dreamhost will stop any remote fetches gems!). I install Rails 2.0.2 into my local gems. 

$ rake rails:freeze:gems

Still fails. Great. Turns out Dreamhost installed Passenger for Rais, which is great since it'll speed up loading. However it's also not working with Rails 2.1.0, which is fine I think since I froze it, but it turns out that Passenger ignores your Gems. Awesome. So I try locking the RAILS_GEM_VERISON and the ENV['GEM_PATH'] in environment.rb and then it works. Now, I try to access the new /admin page. That works. Now we migrate. 

$ rake rb:migrate

Failed in Version 71. F**k!  I go to the MySQL Admin page with a righteous fury and open the migrate script up to see what the 071 script does. Looks like it just makes the tag names safe by converting '.' to '-'. Awesome. Now why would that fail? Who knows. I look through tags and I don't even have any with '.' in them. Great. I do have some with ',' in them, so I fix those and move the schema_info table to 71. I run the migrate again and it seems happy since 71 is the latest. Now I load the front page of the blog.

Fail. I'm fairly peeved now. 

I decide to heed previous experience here and go through the Admin pages one by one and which ones fail. Sidebar. That old f**ker. I go into the MySQL Admin and save the old sidebars in a text file and rip them all out. Reload Admin page. Works. Reload blog. Works. Great! Finally. Easy install huh? You just have to hack you database, edit a bunch of config files, and burrow through some code to get it working. At least I can use the /admin page to edit posts again. 

Posted in | no comments |

A preface to Gurgitate-Mail on Dreamhost

Posted by Erik Rainey Tue, 23 Oct 2007 16:23:00 GMT

When I got my iPhone, I decided to go back to using my Dreamhost account through IMAP so that I could have a single account with a persistent state. While this is nice, I didn't want to have to wade through a ton of spam on my iPhone. Since I wasn't neccesarily have Mail.app or Thunderbird open all the time at home running mail filters, and you can't do that on the iPhone, I was in a bind. How do I filter my mail easily and still use IMAP across multiple devices?


I came across Gurgitate-Mail, a great little filter which is launched by procmail or whatever you use to receive email. You can write some pretty concise email rules or make it even more complex. The point is that you can write rules in a proper programming language instead of cobbling together something in your favorite Mail program. In the coming days I will be posting more about what I've done.

Posted in , | no comments |

Typo Issues

Posted by Erik Rainey Wed, 20 Jun 2007 15:29:00 GMT
About a week ago my blog died, as many of you might have noticed. Part of this was due to weird 500 errors that were occurring due my host's policies about renegade processes. Partly they were due to the mysql database not being the proper version for the version of typo I was using, which was also due to the process killer because every time I'd try to run:

rake db:migrate

I'd wait and wait and wait while the process grew past 100MB and then got the axe. I futzed around with re-running the rake task, trying to find the task manually and finally I started to get frustrated with the whole thing and I had decided to move to Mephisto, another Rails app, but it's more of a CMS than just a blog. I might still move, since they have a blog post converter, but it's only somewhat maintained by it's developers at the moment, and I certainly don't have the time to develop it further. Eventually I deleted some of my older typo installs, installed the typo-4.1.1 version, restored the MySQL database (I managed to completely screw up that thing by manually deleting the session table), ran the rake migration command with the exact rakefile I meant to use

rake -f Rakefile db:migrate

(perhaps the others were spidering all the rakefiles it could find in parent and sibling directories), and letting it "sit" for a while (originally after I had done all of that, it was failing to get to the admin console because it couldn't find the blog with "blog_id==4", which I don't have), then I could log in and everything starting working normally. I think the lesson here is to stay on the stable release branch. Having a host with a backup of your databases is really nice too.

Posted in | no comments |