For the past couple of years I have tried to switch horses from Java/C++/C to DSL (Dynamic scripting languages) – the popular languages Ruby and Python. Why did I do it ? I find enterprises geared up towards either Java or .NET. This isn’t a healthy trend. Java and .NET aren’t the only languages. Of course for services we got to maintain what customers already have. With Cloud PaaS picking up, Gartner predicts customers to start Rehosting, and which will eventually pave way to Refactor. PaaS infra structure is available for many of the languages with all “ities” fullfilled.Yes the PaaS Provider for Ruby on Rails (engineyard, heroku) provide you a runtime for Ruby on Rails. We don’t have one yet for Scala/Erlang, which would be good venture to get in.
So why would I want to write 100 lines of code to accomplish the same in 5 lines ? My application development can be rapid. Folks are happy to be in perpetual beta. I can churn and keep pushing up value added increments faster.
Opensource adoption of ruby and python is huge. Gartner predicts 30% of penetration of DSLs (ruby, python) in enterprise by 2015. I don’t want to wait for incremental improvements in the language to appear from Java 7 or 8 etc..
Now lets gets started. First is to install ruby, and then rails. Rails is a web framework on top of Ruby. Ubuntu 11.10 includes 1.8.x version of ruby. I hear the next version Ubuntu 12.04 released by the end of April 2012 will have ruby 1.9.x enabled as default.
I wanted the latest version of ruby 1.9.2 in Ubuntu 11.10. I followed the following link to setup both Ruby and Ruby on rails. Follow this link =>Installing ruby 1.9.x on Ubuntu 11.10 and Rails 3.x.
After you install ruby, you can verify the version available. : sudo dpkg-query -l ruby*
Few errors I encountered when I ran rails server
After that the default page showed up. So all is well now.
Next basic question is about setting up your development environment and what works as a charm ‘Not the charm my inspiring guru Ananth talked about.
- I prefer debian, which means Ubuntu 11.10. Fedora, Windows (nah :() can be a choice too. The productivity is higher on linux distros.
- Eclipse or Netbeans. My choice was Eclipse Juno on the bleeding edge with RadRails plugin from here.
- If you contribute to opensource, then GiHtub is “The” choice of source control. Voila what do you need. I truly respect the work done by the ruby/rails community in sharing various reusable code. GituHub is filled with tons. Java was more of a formal governed entity with the language getting updated using the JSR process. Apache commons/Jakarta were the major ones which churned opensource reusable code. Python/Ruby are more user proliferated and people no longer are possessed by the fact the ruby doesn’t offer “A”, they built ‘A’ and contributed back.
- Educational books/links for ruby
- Rails 3 Action => Available in FlipKart This book starts well up-to chapter 5 where the context is set. Beyond that it follows the “Behaviour driven development” model and uses a tool called cucumber/rspec which takes english and generates testable templates. I didn’t enjoy much.
- The Ruby Programming Language => Available in FlipKart The fundamentals of ruby language are covered here. So this is a good read for Java programmers. It gave me a background on the new_yet_to_be_release feature in Java -closure (or procs/lamda functions in ruby).
- Ruby on Rails Enterprise Application Development => Available in FlipKart This is a good read for ruby on rails. I use both Rails 3 and this book to refer stuff. The flow of this book is good.
- Railcasts => Link Ryan Biggs, a big fan of him. Shares various rail casts and they are awesome.
- Few links on cloud indentity using omniauth and devise
API Fascade https://github.com/intridea/grape
- Confreaks – 2011 ruby conf. http://confreaks.com/videos?search=ruby+
What next ?Hacking… and explore scala/erlang as well as pet projects.