Merb is going to be a new killer application used as a replacement for ROR (also called Ruby on Rails). It is said to be faster, more reliable, better, more funny and much simpler. That sounds so nice that I gave it a chance and tried some time ago, it was hard to work with that as there was some old release (not stable yet). About two weeks ago there was released some newer version, in the meantime I changed my notebook so I had to install merb and co. once again from the very beginning. While installing I was still thinking if they improved the problem that I had last time: I was using PostgreSQL and setting port number in database.yml was totally ignored by the merb application. It was still trying to connect to the database on the standard port 5432. Of course it could be solved really fast by running PostgreSQL server on the standard port but it was not what I wanted.
Installation
The obvious way to install merb was by using gem install. So I run ‘gem install merb’. Installation went correctly, project was generated correctly using ‘merb-gen’ but with generating any model it wasn’t so easy. Running ‘merb-gen model Users’ ended with an error: “merb_datamapper requires dm-core (= 0.9.6, runtime)”. No problem, I tried to install that gem dm-core. What a suprise when I saw an error that there isn’t any dm-core gem with that version, there is only 0.9.5 available. Well, OK, I installed that 0.9.5. but generating the model is still problematic as the exact version 0.9.6 of the gem dm-core is really required. Of course I could get the correct version from svn or git or something else but that’s not the way it should be done. I haven’t checked all other gems that could be needed but I assume that there could be much more funny problems. Just imagine how to make an upgrade of a production web site – some kind of a nightmare.
I was told by some wiser people to install using sake. The erorr was something like: ’sake merb:clone rake aborted! can’t convert true into String’.
I gave up and tried to create a test application using sequel (another orm like datamapper). After having successful installation of the sequel plugin, I tried to create a model using the famous ‘merb-gen model Users’. The error was quite different. Something about missing method.
Solution?
Feeling totally overwhelmed by the amateurs that wrote the merb and plugins I tried to do what I was told by some wiser people to install merb & co. using Thor. I installed a quite new version that included a patch that fixed the error while generating a sequel model. The idea of the patch is to change one letter in a file:
Line before patch
rm => :sequel do |y|
Line after patch
rm => :sequel do |t|
Well…
Choose one of the following: aaargh, wtf, you’re joking, what a piece of ****.
Thoughts after giving up:
- Merb will hopefully be working when it reaches its 1.0.0 version. But according to what I’ve pointed out below… I wouldn’t be so sure.
- Who makes software/libraries that depends on the exact version of some other library? This should be done with dependencies like ‘>=0.9.6′ but please don’t use the exact version number e.g. ‘=0.9.6′.
- Ruby, Python are interpreted and dynamically typed languages, no compilers, no strict type checking etc. Software written in something compiled C/C++/Java can be checked for many potential problems during compilation. In Ruby there isn’t anything like that, many errors occurs only during execution of a method so this is widely said that there should be some tests to test the application. There are even some huge frameworks for easily writing test scenarios. I thought that it is obvious for people who write applications using Merb or ROR that tests should be used. What’s more this should be obvious for people who create Merb or ROR (or maybe I’m so stupid that only people with huge experience build better frameworks). This was a short intro to my thoughts about the sequel error that was fixed with the above patch. Well… how can someone make a release with such an error. Where is the testing? I think that nowhere, but it such a simple thing as creating a new model wasn’t tested, how can I assume that much less simple things where tested?
- Merb still lacks good documentation. Truly said, it has no documentation if we compare this to the Django 1.0.0 documentation. I spent 3 days trying to do something really easy using merb and I still don’t have any idea how to make some things. Getting to know how to do the same kind of things in Django took me about 45 minutes of reading through documentation.
Related posts:
- New Merb 1.0 is Out Yea… great? Let’s install that. I used thor. First copy...
- Datamapper and Ruby On Rails Aaaaaargh. Some time ago I wrote about problems with merb....
- What I Don’t Like About Python Python – maybe you know – is a computer language...
- Write a Web Site in Pure C++? Sure, why not. The efficiency should be great (truly said...
- Why Ruby on Rails Migrations Don’t Work Ruby on Rails Migrations Migrations in Ruby on Rails provide...













0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.