Sun, 14 Mar 2010

What a Difference a Week Makes

So last week I declared the next year, my year of the ruby, and I haven’t been sitting on my haunches either. I went head first into the murky world of rails 3 beta 1 with all the intentions of using it exclusively from now on for development. But things change, and I have to change with them. I am like a liquid, I adapt to any situation (or container) I am in.

So after a week of trying to get rails 3 to do the simplest things, which is install with datamapper , cucumber, testunit, and the devise plugin for authentication and authorization, I have gone back to using sinatra . And here is why. I spent a week trying to get all of these seperate components to work together nicely, I even wrote 3 patches for the devise plugin for datamapper which made it into the master branch. But in the end last week has not been as productive as I would have liked it. Almost 100% of my time has been used to track down bugs, writing fixes, and trying to see which combination of rails 3 beta, datamapper, and devise versions work together, all that with a side order of cucumber. So while I have done a lot of work this week, I haven’t really moved forward. And being stuck in the same place I was in last week is a very frustrating situation.

So, as I am a very adaptable person, and I want, nay, need to see progress in the things that I doing, I decided to go back to using sinatra for development for now, and work on the small apps that I am developing, which can then be used as rack middleware apps in rails 3 when it is finished, and doesn’t have so many version compatibility issues with other plugins, or vice versa.

In fact I am using something I discovered yesterday called padrino . Which I would describe as, a framework that sits on top of sinatra, but gives you a good starting base and a rails like structure, but with the stability of sinatra.

I also discovered minitest yesterday. Minitest is the replacement for testunit in ruby 1.9.1, so even though you use testunit in 1.9.1, what you are actually using is minitest with a testunit wrapper. Now, minitest is great, once you get to know how to use it. But therein lies the problem. While the actual tool is great, the documentation, examples etc is extremely poor. I basically had to do a little trial and error to get things going with it. This frustrates me, and I would rather spend my time using a tool than trying many ways to find out how to use it properly (hence me holding off on rails 3 for the time being).

But anyway, I feel this will be a more productive week. Just in 2 hours yesterday, I was able to get 70% of the way with sinatra/padrino as I did in a week with rails 3 beta. Now, that is not a slight on rails 3, it just means that it was a bold move on my part, (one that did not pay off) to try and use rails 3 in its beta state, and expect everything to work with it smoothly, or with much less fighting with the code than I did.

So onwards and upwards to week 2. I am expecting big things from this week.

Published By: Philip MacIver
blog comments powered by Disqus