Rails :(

Header Image For This Post

Posted by Andrew Pilsch on Wednesday, August 16th, 2006, at 5:32 am, and tagged as .

Follow any responses to this entry with the RSS 2.0 feed.

You can post a comment, or trackback from your site.

I’m once again reminded of why I really hate Ruby on Rails. Everytime I’m programming a web application in the environment, I’m thinking to myself something alongs the lines of “yeah, yeah, yeah! this is totally the greatest thing ever!” Then comes time to deploy the fucking thing. I know, I know: I should be using a Mongrel cluster to serve my Rails apps and Apache running mod_proxy to serve static content. That’s what I should be doing. However, I don’t have the money to drop on the kind of dedicated hosting it would take to do that and, frankly, I don’t have the time to configure everything about the box on which this ideal Ruby on Rails installation would live. I’ve already had to configure an email server once in my life (and that was one time too many).

So, sadly, I’m stuck with Dreamhost and their “we only use Apache” policy. Frankly, I can understand the desire to only use one web application to serve your content. It makes logical sense (something that I find isn’t true about a lot of Ruby (I’m looking at you, Simply RESTful)). Why should I, really, have to support at least two (but sometimes three or four) programs to serve Rails? It’s not that good … or is it?

Anyway, deploying a Rails app to Dreamhost is a nightmare. First, especially with Mephisto, the app itself is huge (which isn’t Dreamhost’s fault). Then, because you have to run apps using mod_fcgi on Apache-only hosts, I have to wait for the Rails fastcgi to figure out it needs to start. Sometimes, this can take twenty minutes of pressing reload. Fun.

Of course, what’s even more fun is finding out that the stupid Rails app you’re deploying doesn’t actually work in the way you want to deploy it and you have to hack a solution into the source code (because the way Rails apps are supposed to work, doesn’t, in fact, work) and then get all those happy fastcgi processes to restart. Arggh. People always talk about automating application deployment with Capistrano and they can bite my ass. If getting the stupid files onto the server were the most difficult part of making a Ruby on Rails app work, Capistrano would be a great product (actually, Capistrano is a really great product … just not suited to fixing all the “fun” problems that crop up during a Rails deployment).

The best part is that once you finally get the application up and running on Dreamhost, it’s slow. This, again, isn’t entirely Dreamhost’s fault. I think the machine my site is hosted on has been running slow for a while. That could be part of it. Also, the way Apache handles page requests appears to make Rails run really slow. Mongrel and LigHTTPD (the web servers of choice for Rails) both handle page requests in a different manner that isn’t necessarily better, but makes Rails happy.

I’m starting to think that Rails may be analogous to an abusive spouse. Although, even that isn’t entirely right. It makes one aspect of a programmer’s life so much easier, while making other aspects much more painful. I keep coming back for more, though. I guess the real question is, would I rather have to actually enter SQL statements into a database server and then write another database access layer OR have to spend a half hour fighting with finicky fastcgi crap over a slow SSH connection once?

The answer to that seems obvious, but I wish I didn’t have to have my faith in my Rails apps shattered everytime I deploy one. I still have trouble completely trusting my Gradebook application, because in the back of my mind, its going to flake out one day when I’m posting grades and throw a 500 Error and then … I’ll be sad.

Anyway, I actually moved the blog onto my Dreamhost space. So, I guess it’s “live” or something, now.

Comments

  1. Justin said:

    You know, I really have to wonder why you did end up taking the route of English instead of SWE or CompSci.

    Every time I think about it, I nearly terminate in a divide by zero error.

    Permalink


  2. andrew said:

    Probably because of crap like this. If all my software projects didn’t end up going down in flames, I would think I might have some talent in these regards.

    Besides, the English stuff I’m doing is pretty far away from Shakespeare and Dickens. Right now, I’m reading up on urban warfare and contemporary city planning for a paper on tourism, as a for instance. I’m also reading a biology textbook to get up to speed on recent trends in microbiology.

    Permalink


  3. Justin said:

    Honestly, I couldn’t agree with you about the “going up in flames” bit. You’ve always had an aptitude for stuff like that, despite the problems you’ve run into in your various projects. But hey, as long as you’re happy doing what you do (or feel some sense of fulfillment) then keep on keepin’ on.

    Permalink


  4. BJ said:

    Amen! I just stumbled upon this site after, you guessed it, wrestling with SVN, Capistrano, and Dreamhost all afternoon.

    Loading…

    Permalink


Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*