Kamis, 10 Oktober 2013

Experience Using Ruby 2, Capistrano 3, and Rails 4

Okay, guys, this is maybe not the first time I've used bleeding edge technology or new technology, but this time, I've through a lot of painful mistakes to knowing that it is fun and hard to use new technology. It is hard because I'm categorized as early adopters. It means it is very hard to getting any help from the community. Every error I found cannot be found at Stackoverflow. I need to figure the solution by myself, by reading the documentation that I think not very well documented because it is still early, although the technology is marked as stable. Okay, it was fun because in every technology design, I believe that the inventor has a great plan to make a better life for the user.

This year is a big year for web Ruby developer. A pretty well-used programming language called Ruby comes with a new major version (2.0.0). A lot of improvement has been added to the language. Then, the most anticipated Ruby web framework also released a new major version (4.0.0). And lastly, the most used deployment gem for Ruby, Capistrano, also released a brand new major version (3.0.0). I've seen the change logs of each technology and it was awesome. I cannot wait to develop with these tools. :D.

Even though with this excitement. I know my road will not be smooth. I'm pretty sure that I need to tweak a lot to make the technology work well. So the first problem is installation. Ruby 2.0.0 need more library than Ruby 1.9.3. Not a big deal. Just install some package and it's done. The problem arise when one of the ruby library (gem) was incompatible with Rails 4.0.0, it was Active Admin. Moreover, I used NoSQL (MongoDB) and Mongoid as it's driver. So the problem is, at the time this article is written, MongoDB obejct document mapper for Rails is not stable and Active Admin for Mongoid is not very good. So, I choose to abandon MongoDB for this time and go with the lovely MySQL. It went quite smoothly. I've noticed some minor change but it is still fixable. The rage comes from when I want to deploy the application. I used two days to make the deployment works. So, the update to Capistrano (3.0.0) was quite huge rewrite to the library and the documentation was not really that good. I also need to contact the library maintainer to get the solution. Nevertheless, They solved my problems. Now, the application running smoothly at the staging server and very easy to update. I think, this is the state-of-the-art rapid development in the web right now. 

So, if I compare the Ruby-Rails-Capistrano and Python-Django-Fabric, Python still a winner compared to Ruby because it's simplicity. Rails has way too much third party library rather than Django and from the feature itself, Rails is clearly a winner cause the current stable version of Django haven't get any native migration tools. We need to wait 2 minor version to get the native migration tools. Capistrano is very much more helping than Fabric because it is designed for deployment tools, while with Fabric, you need to add more command. In the end, The world of web technology is vast and rapidly developing and it comes down with personal choice. Pick the right technology and deal with it. :D.

Tidak ada komentar:

Posting Komentar