Programming

The Pain of Rails

There are a lot of cool applications written in Rails but I often find that the configuration and setup is such a pain that you quickly lose the desire to run them. There’s only so much moaning about some library interface or missing gem or obscure data driver error you can take.

This kind of flakiness (particularly around the database area) has been driving me back to Java applications and alternatives such as Grails. It has also made me look at other frameworks than Rails. Since JRuby 1.1 was released JRuby has often been easier and faster to use than MRI Ruby.

Yesterday I had a kind of typical example of the kind of thing I find a pain. I had setup a new Ruby instance on Hardy Heron and was going to give Mephisto a go with SQLite3. I could do with an easy to use CMS and Ola Bini had already Tweeted that the setup had been easy under JRuby.

So having downloaded a few gems and the code, copied and set the database configuration I give the server a run and get an error about not being able to include the “initializer” file. Now this foxed me and I double-checked the documentation on installing Mephisto and tried to install an Initializer gem if there was one and I had a look at the boot.rb and saw that it was indeed trying to require initializer.

The problem is that when I had initially installed my gems I had forgot to install Rails itself. Nowhere was there a simply message telling me that though! Instead you have to kind of know that Initializer is the first script that Rails runs (and indeed that it is part of Rails).

There is a lot of Rails problems that I am sure are simple for people who work with it all the time but often I find myself coming with a task I want to do and coming away with a tussle with Rails instead.

Standard

One thought on “The Pain of Rails

  1. I find deploying Rails a pain, and I’ve deployed many Rails apps, from the small to the huge cluster type.

    For all the beauty Rails provides, it’s just not pleasant to deploy like PHP.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s