More than a month has passed since my last update. Did you miss me? I sure missed you, I truly love you guys. Jokes aside, it was rather uncharacteristic for this blog to go so long without a post, so I feel that a status update is in order before my feed ends up in the Dinosaur reports of your RSS reader. And with humanity facing the imminent threat of the Large Hadron Collider, I didn’t want to be sucked into a black hole without saying a few last words.
At the beginning of August I moved from Markham to Toronto (technically North York). My wife and I were prepared for this move, so it went well. That said, there were negative aspects beyond our control.
The Satellite Dish installer had a few interesting discussions with our property management, and while they eventually agreed to a compromise that would preserve the holiness and virginity of my balcony, they also caused me to miss the opening ceremony of the Olympic Games. I really wanted to see the fake singing by the Chinese kid and the computer generated fireworks, but alas nothing. I consoled myself by eating dumplings a la Kung Fu Panda, minus the Kung Fu part.
Perhaps more devastatingly my ISP took its sweet time to activate my DSL service. And when they did, things worked on an off for all of August. When my ISP had problems connecting me to the tubes, I tried what any respectable geek would do. Despite my impression of the Statue of Liberty, standing near the window with my laptop in hand, my attempts to freeload on Wi-Fi were futile.
If these disruptive happenings weren’t enough, I’ve been very busy with work and the book I’m writing (Ruby on Rails for Microsoft Developers). I’ve written 7 chapters so far and just passed the 300 page mark. The schedule is tight, and there is so much that I want to include, so I have to dedicate almost all of my spare time to the book. On the bright side, I think I’m going to give readers their money’s worth.
The direct consequence of my focus on the book is that This Week in Ruby and This Week in Rails have been interrupted. A few of you enquired about them, bringing to my attention how much you appreciated them. Unfortunately, for the next two months I won’t have time to read all the daily feeds I normally follow and come up with weekly (or bi-weekly) reports of what’s cool and worth mentioning from. My friend Gregg Pollack may take over for the Rails post that gets published on the official blog. Unless someone sends me a complimentary English Bulldog puppy, in which case I promise to do both reports weekly and I’ll even put your picture with a halo over your head on the sidebar of the blog.
Another victim of overcommitment is the (vapor)shootout. Right now I’m at full capacity and need the laptop for both work and the book, so that will have to wait. If you want to lend a hand with the project, feel free to jump right in though.
Finally, while I may not have time for the weekly reports or the shootout right now, I can still spare some time to write posts more frequently. And there is no reason not to indulge in such a rewarding activity. So expect more technical articles, especially now that there are many interesting things to talk about (Google Chrome, Django 1.0, Rails 2.2, etcetera).
This is the 13th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments. Also, if you enjoy the series and this blog in general, please consider recommending me on Working With Rails.
JRuby 1.1.3 has been released. This version includes several bug fixes and major speed and memory improvements.
Satish Talim of RubyLearning has announced a new course dedicated to the subject, and also interviewed Charles Nutter for the occasion, who provided some suggestions for RubyLearning participants. This week, Satish also interviewed Guy Naor, the CTO of Morph Labs, a prominent cloud computing Rails hosting company.
On the .NET side, things are moving just as quickly. Some great news emerged from OSCON 2008 regarding IronRuby, including the first binary release and the setting up of a project called ironruby-contrib on GitHub. This already includes the Rails plugin for Silverlight. Meanwhile, Peter Cooper published a great set of IronRuby tutorials to bring C# developers into the Ruby fold.
In the alternative framework world, Mack Framework 0.6 was released, which includes DataMapper 0.9.2 and RSpec support, transactional tests, internationalization and other improvements. The roadmap to Merb 1.0 was also posted on the official blog.
I had previously mentioned a few well known issues with Ruby and XML. Well, it appears that there is hope regarding a libxml-ruby resurrection after all. RedCloth 4 was also released this week.
Two interesting articles were: Don’t forget about RubyForge, which covers the issue of mass migration towards GitHub, and Modules underuse by Jay Fields.
Toronto’s sponsor-less conference RubyFringe is over and according to its participants it was fantastic. I truly regret not being able to participate in it. For those who were there, feel free to share your opinions in the comment section.
One last thing before you go; I must give my “caught-red-handed Ruby Community award” this week to Thiyagarajan Veluchamy. This dude thought it was a good idea to lift the entire content of one of my most popular articles from more than a year ago, even hotlinking the image, and then attributing the post to himself. Did he really think that no one would notice? Its link became popular on Del.icio.us for the Rails tag, and I got all sorts of emails from people who recognized my old (and now somewhat outdated) article. After a brief investigation, it turns out that Thiyagarajan has a habit of stealing content. Other articles appear to be copied verbatim from various blogs. Thiyagarajan, a word of advice, gathering inspiration from a certain post is fine, copying it is not. Especially if you try to pull it off by copying from someone who reports on the most interesting and popular posts in the community. That’s just a really dumb move.
To keep the good times rolling, the fourth edition of This Week in Rails is available on the official Rails blog.
This is the 12th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments. Also, if you enjoy the series and this blog in general, please consider recommending me on Working With Rails.
I’d like to start this edition by apologizing to my readers for the delay in publishing this edition. Things got pretty hectic last week.
As far as I know, there are no updates regarding Ruby’s vulnerabilities, but if you’re aware of any, feel free to state so in the comment section. Meanwhile, BreakingPoint Systems published a couple of extra problems that were discovered while analyzing those pesky security issues. You can read about them here.
As you may have inferred, I’m quite interested in the optimization of Ruby code. Ilya Grigorik wrote 6 nice tips for optimizing Ruby MRI, which may come handy to you.
A new chapter was added to The Book of Ruby by Huw Collingbourne. Read more about it and download it here.
The Ruby community is big on TDD and BDD and there is no doubt that testing is fundamental for good quality software. RailSpike opens a can of worms with its thought-provoking article, Testing is overrated. Whether you agree or not with its findings, it is definitely worth a read.
Ethan Vizitei has had a couple of compelling entries lately. The first is about handling Gmail’s imap from Ruby and the second deals with refactoring Ruby code.
Sinatra is an ultralight Web framework, while Datamapper is considered by many to be a valid substitute for Active Record. Nick Plante shows us how to use them together to create a Pastie clone. If you are into Datamapper or would like to just get a feel for it, consider reading over this cheatsheet as well.
In conclusion, InfoQ published a Metaprogramming roundup and the second part of their RubyKaigi 2008 coverage. The most interesting bit is about the exciting prospective of standardizing Ruby. That would be a leap forward for the language and our community.
To keep the good times rolling, the third edition of This Week in Rails is available on the official Rails blog.
This is the 11th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
This edition begins with some bad news: Several vulnerabilities that affect the main Ruby implementation have been discovered. There is no reason to freak out, but they are serious. An ill-intended person could take advantage of these vulnerability and execute arbitrary code. Matasano has a few practical examples which illustrate the vulnerabilities in question. To learn more head over to the official advisory. Unfortunately, the suggested upgrades (except those for Ruby 1.8.7) are currently not working for many Rails developers, who’re reporting segmentation faults. The Phusion team has created a patch that was reported to be working, but it would be nice to see the Ruby Core Team verify and incorporate it quickly. If you’re running a version of Ruby that shipped with Mac OS X, don’t upgrade yet. Instead wait for Apple’s Software Update.
RubyGems 1.2 was released and it’s much more responsive than previous versions of it were (no more bulk updates just to install a new gem). To upgrade run: sudo gem update --system (without sudo if you are on Windows). After a substantial refactoring, Mocha 0.9 – a framework for mocking and stubbing – was released this week. A new BitNami RubyStack version was released (1.2 beta) as well, which adds a lot of goodies to the package, including but not limited to NGINX, Thin, Rack, EventMachine and so on. Speaking of EventMachine, check out EventMachine: Fast and Scalable Event-Driven I/O Framework published by InfoQ. Last week they also published an interview with yours truly, in regards to the Ruby Benchmark Suite. I regret that the shootout testing hasn’t started yet as promised, but Murphy’s law got in the way.
For those interested in improving their language-fu, there were a numbers of interesting articles: Using select, reject, collect, inject and detect, Enumerating Enumerable, Macros, Hygiene, and Call By Name in Ruby Eliminating code duplication with Metaprogramming. Also noteworthy, this piece on working with Microformats from Ruby.
A Ruby Community Announcements group was started in order to provide a fast ML for announcements only. It’s for those who’d like to stay in the loop, but wish to avoid the high volume of messages in Ruby-Talk.
The erubycon conference about Ruby and the Enterprise will be held between August 15 and 17 (‘08) in Columbus, Ohio. They still have a few seats available, so if this topic is of interest to you, grab a spot while you still can.
Finally, if you’re hiring Ruby talent or plan to look for a Ruby job any time soon, take a peek at these 15 fundamental questions for Ruby interviews. They’re somewhat basic, but the article is a good staring point nevertheless.
ALT.rb
From the world of alternative implementations and frameworks, I found this article on Rubinius FFI, an introduction to MacRuby as a replacement for RubyCocoa, and the announcement of Merb’s run_later” method for backgrounds tasks, all to be informative.
To keep the good times rolling, the second edition of This Week in Rails is available on the official Rails blog.
This is the 10th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
As announced a few days ago, This Week in Ruby is being split into two parts: This Week in Ruby and This Week in Rails. The one you are reading is the Ruby edition, while Riding Rails – the official Rails blog – will host the Rails one. Links to and from each post will be provided, in case you don’t follow both blogs.
Ruby
The Ruby community has shown a clear interest in Behavior-Driven Development (BDD), so if you haven’t taken the plunge yet, check out Ben Emson’s introduction to RSpec Stories. Those who’re already well versed with RSpec, will enjoy an article by another Ben, in which RSpec’s DSL internals are explained in detail so as to cover an example of creating macros with RSpec.
The Pragmatic Programmers published a series of screencasts about The Ruby Object Model and Metaprogramming. So far they’ve received glowing reviews, including my own, hence I highly recommend that you evaluate them.
A couple of weeks ago I announced the creation of a Ruby Benchmark Suite project. The next shootout will take place starting from the 24th and I should be able to get the results up on this blog by the 30th of this month.
While working on modifying his RX Ruby Tokenizer to be included in the Ruby Benchmark Suite, Tim Bray reported a few considerations on the sad status of REXML and Ruby 1.9. It’s definitely an interesting read, and it’s important to increase the awareness about the current pains of working with Ruby 1.9 and REXML.
Yesterday, Tim also had a post titled Deletionist Morons about the controversy surrounding the proposed deletion of Why the lucky stiff’s wikipedia entry. The Ruby community at large vouched for Why, who is clearly one of its biggest, and definitely most original, contributors.
Finally, the fun Ruby article award of the week goes to Ilya Grigorik for his Tumblr, RMagick and a Photo Frame!
ALT.rb
RailConf’s presentation regarding MagLev has been an attention grabber in the world of alternative Ruby implementations. A video of Avi Bryant’s demo is now available online, as well as a somewhat older interview with InfoQ. You can read Chad Fowler’s take as well as mine.
MacRuby 0.2 was released about 10 days ago. For those not familiar with this project, it’s an Ojective-C based implementation of Ruby 1.9 for Mac OS X. The general idea is to have a Ruby version that lets you write Mac applications that perform reasonably well. In the upcoming shootout we’ll be testing this early release as well.
Those of you still working in Java, but interested in the possibility of using Ruby’s testing tools and frameworks, should pay attention to the release of JtestR 0.3. As you can imagine, this works thanks to JRuby’s interoperability capabilities with Java. If this alternative Ruby implementation for the JVM appeals to you, you should probably also read Thomas Enebo’s interview about the future of JRuby. Speaking of interoperability, at Tech Ed (that’s a Microsoft event), John Lam demonstrated a cool prototype for the integration of IronRuby and ASP.NET MVC.
Readers interested in contributing to Rubinius, should take a look at this write-up about getting started with hacking on Rubinius.
Web Frameworks
At the latest Toronto Rails night (which I didn’t attend, but I soon will be as I’m moving downtown), Rowan Hick presented Merb, and has now made his presentation
available online. Speaking of Merb, Engine Yard Express is a new free product that lets you try out an Engine Yard “slice” wrapped up in a VMware image, and both Merb and Rails are supported.
The 2008.06 version of Ramaze was released last week. Aside from switching from a numeric release scheme to a date-based one (which I personally like much more), this is a major release that introduces over 450 patches and a few changes to the internal API.
To keep the good times rolling, the first edition of This Week in Rails is available on the official Rails blog.
You may have noticed that a few days ago I didn’t post a new edition of This Week in Ruby. This was intentional and related to the future of this series. Let me tell you about it briefly.
Ever since I started This Week in Ruby, I’ve received many emails from people telling me how much they appreciated a weekly summary of the most relevant and interesting highlights from the Ruby and Rails communities. So I feel completely compelled to continue the series and I don’t plan on ending it anytime soon.
However a new and important arrangement has developed: I’ve been asked to write a weekly summary exclusively about Rails for the official Rails blog. This means that every Sunday/Monday, I will publish This Week in Ruby (without the Rails bits) on this blog, and This Week in Rails on the Rails blog.
This is the 9th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
Ruby
Two days ago JRuby 1.1.2 was released. Amongst several bug fixes and improvements, this release is characterized by a focus on performances. Startup time, threading, method calling and YAML symbol parsing have all been drastically improved.
Huw Collingbourne of SapphireSteel, has announced that he’ll be releasing a complete book on Ruby, chapter by chapter, free of charge online. After reading the first chapter, I can attest that it’s excellent. Keep an eye on it, as new chapters get added.
The Pragmatic Programmers put out a series of screencasts for sale. The most relevant series for Ruby programmers is Everyday Active Record. The first two episodes (a half an hour long, each) are out and can be purchased for just $5 a piece. The preview — and Ryan Bates’s reputation — lead me to believe that they are entirely worth their very reasonable sticker price. Speaking of screencasts, a new one about merb-slices was released on Merbunity, check it out if you’re into Merb.
There were two important releases last week, Mack 0.5.5 — which features a new rendering engine with support for Haml and Markaby — and DataMapper 0.9, a major reworking of the ORM. A third release, which is perhaps just as welcomed, was launched by _Why who included a few graphical improvements for Shoes, his GUI application toolkit. Definitely neat stuff, which I invite you to take a look at if you’re working on a Mac.
Peter Cooper published 21 Ruby Tricks You Should Be Using In Your Own Code. You probably know already most of the common ones at least, but they’re quick and fun, so if you haven’t checked out the post yet take a moment and do so. Other must-read tutorials and articles were Ruby && DTrace! (really neat results), Ruby EventMachine – The Speed Demon by one of my favorite Ruby bloggers, and Will’s Guide to Mashing-up Remote Databases using Page Scraping.
In a post made a couple of days ago, Robert Fischer opened up a can of worms by bringing up the issue of Ruby and XML libraries. As most of you know REXML is far from being issue-free (performance in primis), and in The Status of Ruby’s libxml Robert uncovers that the author of LibXml Ruby is unable to actively pursue the development of his extension. This issue concerns me, but if I’m working with databases, I prefer to take advantage of DB2 Express-C ’s fantastic pureXML features, which give me the sort of speed, flexibility and stability that I won’t find in a Ruby library anytime soon.
Before highlighting some of the news from Rails-land, I wanted to inform you that a new version of The Great Ruby Shootout will surface in June, as I intend to test a couple of special new entries.
Rails
Today, RailsConf 2008 started and it certainly stands a great chance of being dubbed an exhilarating event. A few people enquired to see if they could meet me there, but unfortunately I couldn’t make it. Chances are that you’re reading this post from RailsConf. If that’s the case, say hi for me and don’t forget to visit the nice fellas from Engine Yard, Morph (my sponsor), Phusion and GemStone. Oh and also, feel free to pass around the url of this entry.
Rails 2.1 RC1 is out, so you’ll find this article on upgrading to Rails 2.1.0_RC1 useful. Fabio Akita released a new version of his popular tutorials, Rolling with Rails 2.1 (part 1 and part 2). And if you are looking for an advanced authentication/authorization system for Rails 2, take a gander at Lockdown on RubyForge.
My friends at SeeSaw implemented a series of Rails Widgets which can easily be installed as a Rails plugin. Feel free to use them and/or contribute, in order to add further support for simplifying and reusing common UI elements. Speaking of shiny things, check out this Ruby on Rails icon pack; very pleasing to the eye, in my opinion.
RubyInside published a list of 28 mod_rails / Passenger Resources To Help You Deploy Rails Applications Faster. As DHH forecasted, “this could definitely become very popular, very fast
”.
New Relic released their RPM solution for monitoring and improving the performances of Rails applications to the general public. You can get it here.
And finally, some great news just came in, IronRuby is running unmodified Rails. “Excellent” (said in Montgomery Burns’ voice, complete with characteristic hand gesture).
This is the 8th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
Ruby
Yehuda Katz released a couple of “gems” this week: Thor improves Ruby’s support for scripting, and it was created while he was working on a Textmate gem for handling bundles.
You may have heard about the book: The Ruby Programming Language. I found this review to be an interesting read if you are considering purchasing it.
Struggling with regular expressions in Ruby? Now you can use Rubular, an excellent way of editing and testing Regular Expressions in Ruby, so that “you don’t have a new problem”.
If you are one of the developers who prefers Flex to Ajax, then you need to check out Ruboss, a new framework aimed at simplifying the creation of Flex powered Rails applications. The co-author of the framework is also the author of Flexible Rails, a well written book that I’m trying (slowly) to read, even if at this stage I don’t plan to use Flex.
DataMapper continues to gain momentum in the Ruby community, particularly for its usage with alternative frameworks. An article titled Thoughts on DataMapper provides a lot of insight into this enterprise level ORM.
Rails
The big news this week is that Rails is finally on Rubinius. This follows a previous announcement in which the Rubinius team managed to get Merb up and running. Once long ago, at the time of my first shootout when Rubinius was a very young project and performed poorly, I had an email exchange with Evan Phoenix and I told him, “I secretly think that your project may become the most interesting implementation of Ruby.”. I stick to that conviction. As long as they manage to improve performance to the point of being as fast as Ruby 1.9, they have a shot at becoming the most popular Ruby VM. The company that made this possible is Engine Yard, and you may be interested in checking out this interview with their CEO, Lance Walley.
WindCityRails is a one-day (September 20, 2008) not-for-profit conference. There are only 150 places available and these will sell out really fast. Book your sit now, it’s only $99 for a day of fun and coding.
Other remarkable articles from this week were: Chunky Iterator: So You Don’t Have to Load All Your AR Objects at Once, Do we really need Controller and View tests?, Guide to Unobtrusive JavaScript and SWFUpload, Paperclip and Ruby on Rails.
Not exactly published last week, but still worth mentioning is this series of Notes from the Advanced Rails Studio (part 1, 2 and 3).
mod_rails
Dreamhost is now officially on Passenger; this is a major score for the guys at Phusion. They also have a challenge up with t-shirts offered as a prize, for those who can identify the various deployment configurations compared in two speed and memory charts, while testing the blog engine Typo 5.0.3.
This week Geoffrey Grosenbach shared his point of view regarding mod_rails in Ask Your Doctor About mod_rails, while the second part of Ubuntu 8.04 Rails Server Using Passenger went up.
It could be said that the Phusion guys are very good at creating hype for their products, but — for now I can’t say more than that — they seem to deliver.
This is the 7th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
Ruby
The tickets for RubyKaigi went on sale yesterday. RubyKaigi is the Japanese equivalent of RubyConf and will take place from the 20th to the 22nd of June.
Yehuda Katz blogged about Benchwarmer, which is an improved DSL for doing benchmarks. The repository can be found on GitHub.
That mad man, commonly known as why, has released another interesting proof of concept, aptly named Unholy. It’s a Ruby to PYC converter that aims at compiling Ruby sources to Python bytecode, making it possible to write Ruby code and run it on CPython. Not only that, but with a patched version of decompyle, it’d be possible to obtain Python source code that could be used, for example, on Google App Engine. Don’t expect to run Rails on mod_python anytime soon, though.
The Rails community may favor Macs, but there is no denying that there exist a huge amount of developers using Ruby and Rails on Windows. As a matter of fact, the One-Click Ruby Installer is the most popular project on RubyForge with almost 2.4 Million downloads, and Instant Rails is not doing too bad either, having surpassed the half a million mark. However, there is now another easy way to get the whole stack that’s required to run Rails on Windows (also available for Mac and Linux), and it’s called RubyStack. Unlike InstantRails, this is an actual installer and it includes: Ruby, RubyGems, Rails, MySQL, SQLite, Subversion, ImageMagick, Mongrel, Apache 2.2.8, PHP 5 and phpMyAdmin. The company, BitNami, also recently published a tutorial on how to add Aptana RadRails and Ruby Debug to the stack. If you’ve tried RubyStack, please leave your comments and opinions in the comments section.
Alternative implementations
Adam Fine, of Israel.rb, has a nice Ruby implementation roundup. You can read and comment on it here.
A couple of weeks ago the IronRuby project received a healthy dose of criticism (including my own) within the mailing list. A lack of openness and status updates, made contributions harder and portrayed the project as progressing at a deadly slow pace. I’m glad to report that the team has reacted in a proactive manner and embraced a more open approach where, for example, code reviews are now published in the ML. IronRuby has changed pace, or at least that’s the perception, and in an open source project this is also important. Now I’m confident that we can expect good things from this project. Meanwhile, you can try IronRuby in your browser, courtesy of Oleg Tkachenko.
You may remember, from a few editions ago, that I mentioned Dan Berger and his fork of the MRI, called Sapphire. DevFi has an interview with him in which he expresses quite clearly his intentions and rationale behind the decision to fork Ruby. Better support for Ruby on Windows, attention to correctness and testing, improving the standard library and a faster evolution of the language, seem to be the main reasons.
Sticking with the name Sapphire, Huw Collingbourne has a nice writeup on Multiple Inheritance, modules and mixins. While his language isn’t a fork of Ruby but rather just inspired by it, Ruby developers will find the article interesting as well, because it covers what Huw perceives as being issues when it comes to Ruby’s modules.
In JRuby-land, on the heels of Java One, Nick Sieger has announced JRuby-Rack which can be used to run Rails, Merb, or any Rack-compatible framework inside a Java application server.
Merb
According to this post Merb is running on Rubinius (if we exclude the ORM layer). Both projects are promoted and sponsored by the same company, so it’s natural that we’ll continue to see better integration.
Two new bundles for Merb and DataMapper are finally available for TextMate users. You can download and read about them here.
A post by Michael Klishin created quite a bit of controversy. Entitled State of Merb on road to 1.0: the good, the bad and the ugly, this kind of status update can be very appealing, as we head towards version 1.0 of Merb. Unfortunately “the ugly” in this case is the tone of the post, which made the author appear immature, due to the gratuitous bashing of Rails developers. It is unfortunate that the author of this nice mapping of a Merb server’s boot process, opted to convey his enthusiasm through blind antagonism. Let me reassure you though, that this is not representative of the Merb community as a whole; which is welcoming, definitely enthusiastic, but far from disrespectful of other projects. Merb developers believe in their project and the technical advantages that it offers over Rails, and have no qualms in stating so either. But they do so in a factual manner, as opposed to vague attacks against people who opt for a different framework.
Rails
Through his Twitter account, David announced that “Rails 2.1 RC1 has been tagged and the gems are on the beta servers”. Now is an ideal time to test it out. If you need some help, this screencast should do the trick.
The fourth part of a tutorial on Routing in Rails 2 was recently published. If you haven’t done so, follow the links to part 1, 2, 3 and 4.
Emacs fans may be interested in this screencast, that shows how to use Emacs with Rails. Other interesting highlights this week were: Write your Rails view in… JavaScript?, Community Engine (a Social Networking plugin), the release of El Dorado 0.9.2 (which adds a group chat option) and finally after_create :pimp, which automatically pings Google (and possibly other services) once the contents of your Rails app have been updated.
Rails deployment
Ron Valente has a guide on setting up a Rails server through Ubuntu 8.04 using Passenger. While Jim Neath, published Using Capistrano with Passenger (mod_rails).
For those interested in cloud computing, I found this article on how to create a “poor man’s” Content Delivery Network with NGINX, Varnish, Merb and Amazon S3, to be very compelling.
Meanwhile the VC funding spree of Ruby/Rails hosting companies continues, with a $3 Million round of financing being handed out to Heroku by Redpoint Ventures.
This week, Ezra’s Deploying Rails Applications: A Step-by-Step Guide finally hit the press. I ordered my copy from Amazon and it shipped yesterday. At about the same time, Advanced Rails Recipes: 84 New Ways to Build Stunning Rails Apps was published but, at least in my case, hasn’t shipped yet.
Railscasts 100th Episode Contest
Ryan Bates had a contest for his 100th Episode of Railscasts. Yesterday night he announced the winners. Congratulations to them and to all of those who participated. What’s really interesting though is that now there are several hundred Rails tips out there. You can read (and in some cases watch) all of them by following the links on the contest page.
All this material should be enough to keep you busy until next week. Please feel free to provide comments and feedback on this series.
This is the 6th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
Ruby
Jamis Buck released Net::SSH 2.0, Net::SFTP 2.0, Net::SCP 1.0, Net::SSH::Gateway 1.0 and Net::SSH::Multi 1.0. If you would like to learn why this matters, please head over and read his announcement.
Gemstone is working on a Ruby VM, that’s similar to Rubinius, called MagLev. InfoQ has a nice interview with their Project Manager Bob Walker. These guys are serious and are heavily investing in this project. Their tagline is “Ruby that scales&tm;” and it’ll be interesting to see their announcement at RailsConf in less than a month. Speaking of alternative VMs, my The Great Ruby shootout is now six months old so an update is due soon. I don’t have much spare time, especially now that I’ve accepted an offer to write an exciting book about Rails, but I’ll try to publish a new edition of the shootout in May.
James Edward Gray II has a nice article about the Ruby bundle for Textmate, the popular text editor for Mac OS X. If you are new to Textmate and/or Ruby, it’s a must read.
Rubyhoedown will take place on August 8 and 9 in Huntsville, Alabama. Registration is now open. Yehaww!
Mack Framework
Mark Bates, decided to move away from ActiveRecord for his Mack Framework. Since his first announcement, Mark decided to compromise and let DataMapper be the default ORM, while still allowing ActiveRecord as a possible choice for those who prefer it. DataMapper is definitely gaining momentum, and I feel that Rails’ focus on ActiveRecord is the biggest limit to DataMapper’s widespread appeal.
Rails
David announced to the community that Rails 2.1 RC is imminent. In case you’re wondering what’s new, you can take a peak at the repository on GitHub, or read this RailSpikes article. In short, the article mentions six noteworthy changes to Rails. Rails 2.1 will create necessary directories if they don’t exist, in order to “play nice” with the Git and Mercurial source control systems. Improved support for time zones was added, thereby transforming a real pain in the neck into something easy by tracking Time objects with their time zone. They also added support in ActiveRecord for partial updates and dirty objects. Timestamped migrations, better gem dependency and unpacking, and text helpers which are usable outside of the view, complete the aptly titled article “Rails gets more mature”.
For those of you who’d like to contribute to the Rails project, there is now a guide on how to create and test patches with Git. Perhaps just as important, the official Documentation Project for Rails, which is hosted at GitHub as well, is looking for contributors. But before providing your help, ensure that you head over to their wiki and read the documentation conventions.
This week Capistrano 2.3.0 and Webistrano 1.3 were released, further improving the deployment process for Rails.
HoboFields is an interesting plugin that allows the programmer to define the fields in their model, by generating the migrations for you. Give it a spin!
Another plugin, worth pointing out, is TextMate Syntax Highlighting, which simplifies the process of publishing beautifully highlighted code.
The Rails performance company New Relic received $3.5 Million in investment funds from Benchmark Capital. As I said back at the time of their investment in Engine Yard, Benchmark is doing the right thing by covering their other investments in the many startups who’ve adopted Ruby on Rails as their framework of choice.
Our goal as a company is simple: to make Rails developers’ lives easier and enable their web applications to scale and perform exceptionally well” — Mr. Cirne, CEO of New Relic.
Do you happen to need a whole team of Rails developers? A London based team of six is available for hire. My guess is that it won’t take long before they are snapped up.
A new Rails book
Today there is a new book on the Rails scene. The Art of Rails by Edward Benson went on sale. I didn’t have a chance to read it yet, of course, but I get a feeling that it’s going to be an enlightening one. In fact, it appears to be targeted at intermediate Rails developers, who’d like to learn more about issues such as design, code style, and project maintenance. In that sense, it’s a unique book and far from a “me too” Rails book. The table of contents seem promising as well. If you’ve got $25 to invest in your career, give it a shot!
This is the 5th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
Rails
For some, the greatest Rails news this week was the announcement of a third edition of the Agile Web Development with Rails book. It’s currently in beta and will be finished by October, much to the anticipation of many, I’m sure.
Another interesting development, this time based on actual code, was announced through a post by Ezra Zygmuntowicz, entitled Hey Rails, nice Rack!. Basically, he’s working on “porting Merb’s rack machinery to rails” and it’ll eventually be merged with Rails’ core.
Three Rails related articles caught my eye in particular over the last few days. The first is 5 little-known Rails methods. I’d like to think that most Rails developers already take advantage of them, but if you don’t, it’s a good idea to learn about them now. The second is Building a Social Network Site in Rails, which is not a step-by-step guide, but rather a list of useful resources for building such a site. And finally, I liked Database agnostic != database ignorant in which the author provides a very basic intro to SQL joins and indexes. A much needed piece in the Rails community.
Ruby
The big news in this realm is that GitHub has began serving RubyGems. You can follow the instructions here, and read a nice interview with Chris Wanstrath, too.
JRuby 1.1.1 was released and I’m constantly more impressed by the speed of development of that project. Speaking of which, Charlie Nutter has published an excellent overview and status update of the various alternative Ruby implementations – and don’t miss the video of John Lam’s presentation on IronRuby’s status and DLR.
RubyLearning published a guide to Yahoo! Web Services in Ruby. And by the way, the same site is looking for ways to promote their free Ruby eBook.
Three interesting Ruby articles I want to point out are A Look at Ruby Debuggers by InfoQ, a tutorial about building Mac apps with RubyCocoa and XCode and a screencast on video transcoding and uploading to Amazon S3. Nice stuff.
In the alternative web frameworks arena, Mack 0.4.7 was released as further proof of the development speed of this project. This week Feather was also announced and it’s an open source, lightweight blog engine written in Merb.
Until next week…
This is the 4th episode of This Week in Ruby, please consider subscribing to my feed so as to not miss any weekly installments.
Ruby
As you’ve probably heard by now, this week Ruby 1.8.7-preview1 was released and it’s a major upgrade because it includes several backports from Ruby 1.9. It should help many in this transitionary period without substantially breaking the existing code. On the subject of migrating to Ruby 1.9, I recommend Bruce Williams’ beautiful slides from Scotland on Rails. I’d suggest reading the interview he gave for RubyLearning, in which he dispenses some good advice to Ruby newcomers. Those who’d like something more advanced, may find this clever presentation about metaprogramming very interesting, too.
The funny guys from RailsEnvy came up with an idea for promoting Ruby/Rails people: the Ruby Hero Awards. On the website you can nominate any person from the Ruby community and a panel of community leaders will pick 6 winners and announce them at RailsConf.
With the release of App Engine, Google has surely proven their interest for Python once again. But this month they gave some love to Ruby as well, by releasing a guide for using Ruby with the Google Data APIs.
There were three announcements that may spark your curiosity:
Other interesting articles were Converting Groovy to Ruby by Charlie Nutter, Symbols are not pretty strings and the second part of Rubinius for the Layman.
Rails
As mentioned last week, Rails’ repository has moved to GitHub while this week the tracker moved to Lighthouse. With these changes in place you may want to read about the best practices for contributing to Rails with Git and freezing Rails with Git.
The first tutorials for mod_rails have started to pop up, in particular there was this guide for setting up Passenger on SliceHost with Ubuntu 7.10 and the more discursive Why mod_rails is great for light-duty Rails apps.
The website Open Source Rails collects open source projects that are implemented in Rails. It’s surprising how many of them are practically unknown to the community.
This week two must-read, hands-on posts were published: Import Gmail Contacts using Ruby on Rails and Paperclip: Attaching Files in Rails. Both cover tasks that are extremely common and useful for many web developers.
On the more philosophical side, I published an article called Is the Enterprise world Rails ready? in which I discuss Rails’ origins and their consequences on Rails’ applicability within the corporate world. One a somewhat related note, you can read JRuby – Or how I manage to write Ruby in a strict corporate environment and Why I think Ruby on Rails is an ideal web development environment by Andy Jeffries.
Merb
This week the third part of the Merb and DataMapper Book was published (part 1, 2 and 3). Merb is growing very fast and I think it’s fair to say that it has become THE alternative framework to Rails within the community. New features keep popping up and some of them are indeed very clever ones. For example, this week Ezra published a post about deferred requests with Merb, Ebb and Thin. Briefly put, when you adopt an event-based web server like Ebb or Thin, as opposed to plain vanilla Mongrel, any long request will be a blocker. Now Merb offers the possibility to specify that a certain set of actions, like uploading a file, should be handled by spawning a new thread rather than being served by the main event loop. Very clever and excellent stuff.
This is the third episode of This Week in Ruby, please consider subscribing to my feed in order not to miss any weekly installments.
Phusion Passenger
This week there were a few announcements that will change the history of Ruby. The first of them was the release of Phusion Passenger. For those who spent the last three weeks in a cave, Passenger is the name of mod_rails for Apache and, at the moment, it’s the most talked about piece of software in the Rails community. Let’s put this in perspective to better understand how important it is. A few years ago the recommended way of deploying Rails applications was the employment of Apache or Lighty with Fastcgi. Eventually the community realized that it was less than ideal, and a disaster for those who were using Typo or other Rails applications on most shared hosting plans. Most people then favored the option of using a cluster of mongrel processes, proxy balanced by Apache, Lighty, NGINX, etcetera.
There are other available variants for this configuration, and even some alternatives, but overall most people will agree that the concept of a proxy balancer plus a Ruby web server has been the recommended solution for a while now. It definitely works, it’s stable and scalable, and will probably continue to satisfy many users. There are, however, three disadvantages of this configuration: 1) The setup is not complex, but it’s definitely more complicated for newbies, when compared to what PHP developers are used to. It’s not an “upload and run” solution; 2) In order to work, it requires a decent amount of RAM, and root access to the machine doesn’t hurt either; 3) Most shared hosting companies are unwilling to offer it to their customers. That’s where Passenger comes to the rescue. It’s as easy as it gets (pretty much zero configuration), the company claims a lower memory footprint when used with their soon to be released version of Ruby (called Ruby enterprise edition), and finally it’s ideal for shared hosting because it’s just an Apache module like the ubiquitous mod_php.
As such, Passenger can be that vital missing piece for the wide adoption of Rails on the web. Try it out and if you decide to use it for your projects, don’t forget to feed the two brilliant minds who came up with it by donating here.
GitHub
Amongst other important announcements, is the launch of GitHub, where the Rails community seems to gather now. Think of it as the Facebook of Rails hackers. Aside from Rails, Merb and Capistrano, further projects are continually moving there. Some are even leaving Rubyforge despite their recent addition of a Git option. Both the ORM Sequel and the Ruby VM, Rubinius got on GitHub, even if the latter is only copied over by post-commit hooks.
Ruby Web Frameworks
As we approach the release of Merb 1.0, you may find the official wiki a useful resource and want to consider contributing to expanding it. And if you are interested in Merb thanks to its being leaner and faster than Rails, you may want to read Matt Aimonetti’s informal benchmark, that claims about 70% improvement over Rails for a dummy application.
Sinatra 0.2.0 was released, as a much improved version of the ultra-lean web application framework for Ruby. Very interestingly, an article was published that covers its usage for creating simple Facebook applications. A recommended reading for those who don’t need Rails’ overhead for simple apps.
This week RubyInside covered a new RESTful framework similar to Rails, called Mack. The amount of web frameworks for Ruby is constantly growing and this is due to the ease of creating DSLs in Ruby and the fact that Rack, made the integration with web servers dead easy. Do we really need all these web frameworks? Probably not, but natural selection is a powerful tool and this is interesting stuff that’s worth a test drive anyways.
Rails 2.1 will soon be released, if you are curious about the improved support for Time Zones, don’t miss this well explained overview by Geoff Buesing. The new features are just plain awesome and will make the trouble of upgrading worth it.
Ruby
A few other announcements were made this week in Rubyland. The most important, was the release of the 2.0 version of RDoc, which significantly improves ri performances (hallelujah).
Peter Cooper, who never sleeps, made the announcement of a Ruby community for link sharing, called RubyFlow. It could be a good replacement for ruby.reddit.com, given the clear anti-ruby bias that can be experienced on Reddit.
Jay Fields’ has a nice article entitled Extend modules instead of defining methods on a metaclass which is a good reading about a technique that is often ignored.
The first of 8 books on Ruby coming out soon was published this week. In fact, FXRuby: Create Lean and Mean GUIs with Ruby was finally published. I started reading the first few chapters and it’s very straightforward. If you are into desktop apps, consider getting it. In my opinion it’s a quick read.
Two articles worth mentioning are Ruport: Business Reporting for Ruby by Gregory Brown and Michael Milner, and a brief overview of 19 Ruby template engines. Yes, there are that many!
Finally, please note that the registration for the fifth batch of the popular free online Ruby course by Satish Talim is now open. This course will start on the 3rd of May so sign up now if you are interested.
The first edition of This Week in Ruby received a warm welcome from the community. A week later, here we are with a second installment of the series. I’ll attempt to repeat these posts approximately every week, so feel free to follow along by subscribing to my feed.
The Ruby community is a tremendously active one. In only seven days, there have been so many noteworthy items popping up, that it would take me hours just to mention them all. I’ll try to pretend that you, the reader, have been on a week-long vacation in a remote place without internet access, and on your return you asked me, “Hey, Antonio what happened in Ruby and Rails land while I was away?”
Some fun on April Fools’ Day
We kicked off the week on a lighthearted note, by fully embracing the endless opportunities offered by April Fools’ Day. Most of the spoofs and jokes were aimed at making fun of Ruby on Rails, one way or another. Testimony to the self-irony that we, as a community, certainly have. I personally announced the soon-to-arrive release of a fictitious (of course) framework called Ruby on Crack. Which was supposedly much faster and productive than Rails. At the heart of the joke were the fake endorsements, chocked full of double-meanings (with apologies to Matz, David Heinemeier Hansson, Dave Thomas, Ezra Zygmuntowicz, Obie Fernandez, Zed Shaw, Tim O’Reilly, Guido van Rossum and Paul Graham). I found the SQL on Rails April Fools’ gag very funny and extremely elaborate. Their screencast is comedic genius and their site a spoof in every minute detail. In my book, on that day, they took the cake. The joke itself was from two years ago (as pointed out by a commenter below) but it resurfaced again this year. The hilarious trend continued with Cobol on Cogs and for the ASP.NET and PHP nostalgic, with Acts as ASP.NET and RHAP (Ruby Ain’t Hypertext Preprocessor). Avdi Grimm even found the final solution to the whole Monkey-patching diatribe: Ninja-Patching, “When you really want to catch a coder by surprise, a monkey doesn’t cut it. What you need is a Ninja.”.
mod_rails
Last week I mentioned Passenger (aka mod_rails). This week Hongli Lai published some interesting benchmarks that compared it against Mongrel and Thin for three Rails applications (Typo, Petstore and El Dorado). While still synthetic benchmarks, the results where very encouraging and showed how Passenger was on average faster than Mongrel and roughly on par with Thin. Even just the perspective of having performances that are somewhat comparable with those of Mongrel, would be great news, given that it’d highly simplify the deployment process of Rails applications with Apache. Ninh Bui has announced that the official release date for the project is expected sometime this week and that meanwhile they are working with companies like Twitter and Dreamhost to ensure that the module is fully tested. Speed is only one of the project’s aims in fact, with a lot of focus put on stability and robustness, too. They also caught the attention of Engine Yard who is interested in discussing a possible partnership and contributions to the Rubinius project.
Git
By now you should be aware that the Rails community is fully embracing Git, and github.com is only part of the reason. Michael Bleigh has even created a small library called ruby-github to simplify access to the GitHub API. David has announced that Rails is moving to Git and the ticket tracking system is being switched over to Lighthouse. As David pointed out, this means that both the tracking system and version control are to be run by Rails applications, which is a good bonus if you subscribe to the philosophy of “eating your own dog food”. For those who are still git-challenged, Kurt Schrader has a collection of helpful links to get you started. And if you need a simple issue tracker for git, version 0.1.2 of Ditz has just been released, too.
Conferences
Confreaks has now published the remaining videos from MountainWest RubyConf 2008. They’re very interesting and highly recommended. All of them.
In case you missed the Ruby Fools conference, held on April 1st and 2nd in Copenhagen, you can read an interesting personal account by 41Concepts. The conference also took place on April 3rd and 4th in Oslo.
Speaking of conferences, Sam Ruby will be presenting on Ruby 1.9 at this year’s OSCON. In a recent short post, he mentioned his plans for his talk and really nailed one of the problems that will hinder Ruby 1.9′s adoption, in his own words:
My tentative conclusion at this point based on observations of efforts to get products like Rails working on Ruby 1.9: the biggest obstacle to Ruby 1.9’s adoption is the sheer number of mostly working but essentially unmaintained gems that virtually everybody in the Ruby community depends on. — Sam Ruby
Rails
Amazon has an article on Using SimpleDB and Rails in No Time with ActiveResource. Another interesting article which surfaced this week was a post called simple pages for easily creating “boiler-plate” pages in Rails.
Three interesting plugins where released. You can read about them in Introducing Action Messager: Dead simple IM notifications for your app!, Better Partials Plugin for Rails and A Rails 2.0 Message Forum Plugin.
The Rails Jedi posted about two Mac OS X applications for accessing Rails docs in the most efficient way possible. Nookkit.app and RailsBrain are real timesavers, and I highly recommend them to Mac users.
SapphireSteel has announced the Public Beta of their Visual Rails Workbench. With the release of Ruby in Steel 1.2 Beta 3, they have in fact included their drag-and-drop visual environment for Rails. I didn’t have a chance to try it out, but if you are on Windows you may want to give it a shot, starting with reading their online articles.
The ink for printing Ruby and Rails books never runs dry, as I pointed out in my post 7 soon to be released Ruby and Rails books. It turns out that in the months of April and May alone, there will be 8 new Ruby/Rails titles. Check them out, especially if you are looking for updated material relating to Rails 2 or, in the case of the pickaxe 3, to Ruby 1.9.
The guys from Rails Envy, published episode 25 of their Rails podcast. If you are not familiar with their fun podcast, I recommend that you listen to a few episodes by subscribing to it through iTunes.
Ruby
There were countless interesting Ruby articles in the last week, but I’d like to point out the following:
Ruby VMs
In Rubinius for the Layman, Part 1: Rubies All the Way Down, Mathieu Martin has a nice, gentle introduction to Rubinius with some reveling benchmarks too. For those interested in learning more about the current status of Rubinius, InfoQ has a short article with a few pointers.
More remarkably, in the land of alternative Ruby VMs, Jruby 1.1 has finally been released, after months of hard work. The authors are already thinking about what lies ahead for the project. If the subject interests you, feel free to grab a few slides from various presentations on the topic.
One of the main advantages of Ruby’s growing community, is the speed at which exciting news pops up. This post briefly covers must-read highlights for new developments in the Ruby and Rails communities throughout the past week. I’ll attempt to repeat a “This Week in Ruby” post approximately every week, so feel free to follow along by subscribing to my feed.
Rails 2
Craig Webster published the first part of an easy to follow tutorial entitled Getting Started with Rails 2.0. The nice thing is that it also covers version control through Git, which is becoming extremely common in the Ruby/Rails community. Speaking of trends, a study by Gartner predicts that the Ruby language will reach 4 million programmers within the next 5 years. Numbers that would definitely position Ruby as a mainstream programming language. Incidentally, Obie Fernandez published an interesting survey of major corporations and large companies which are embracing Ruby on Rails. A very impressive list that is destined to grow quickly as Ruby’s implementation and ecosystem improve.
The official Rails blog has a post about a few changes in the core Rails team which brings the number of hackers down to 6, and establishes a Core alumni group of “retired” Rails core programmers. The small team seems to be busy, as Rails 2.1 is about to be released with some new exciting features, such as migrations based on UTC timestamp, named_scope, gems as plugins and much more as outlined by this caboo.se post.
On the deployment side, there are a few exciting happenings. Apple has published the third part of their tutorial, titled Deploying Rails Applications on Mac OS X Leopard. HighScalability.com has an article about an incredible service offered by Heroku that offers one-click, hassle free, cloud computing based Rails deployment. Their service is still in beta, and takes advantage of Amazon web services, but from what I’ve seen so far their secure and scalable deployment is as easy as it gets and it’s going to be a welcomed addition to the deployment options available to Rails programmers. Even more interestingly, a Dutch company called Phusion put up a demo about their Passenger project. Phusion Passenger, aka mod_rails, is a module for Apache that will bring ease of deployment, stability and performance to Rails. The company claims that according to their tests, mod_rails should be slightly faster than using Apache+Mongrel, it handles Rails processes automatically by spawning them depending on the effective traffic, and they are working with the largest hosts in order to ensure real world performance and stability when under heavy loads.
James Golick continues his series of “Plugins I’ve Known and Loved”, this time covering Ultrasphinx, a plugin for the uber-fast search daemon Sphinx.
Nicolas Sanguinetti wrote a script, that attempts to speed up the process of setting up an empty Rails project. I don’t find the procedure particularly boring so I don’t plan to use it, but it might be useful to some people.
Ruby
Peter Cooper, of Ruby Inside, has an article about two re-implemenations of the Ruby language. They are both named Sapphire, adding further to the confusion. The first one is a real fork, which was apparently born from the author’s dissatisfaction with the current management of the MRI, and the desire to have better support for Windows along, of course, with extra features like Aspect Oriented Programming, Unicode, etc, etc… The second one appears to be a new language, a stripped down and “stricter” version of Ruby that is supposed to be more Smalltalk-like and would be running, at least in the beginning, on the .NET platform. They are both worth mentioning, but currently I honestly fail to get excited about them. Ruby has an implementation problem, not a design one, in my opinion. However, we’ll see what they are able to deliver. In my book, a good implementation of a Ruby like language would be far from being frowned upon.
Remaining in the field of new implementations, InfoQ has an article about a neat new addition called HotRuby which is able to execute opcodes generated by the Ruby 1.9 VM (aka YARV). HotRuby is an incomplete and tiny (40 KB) implementation, faster than Ruby 1.9, that runs on JavaScript and Flash.
For those interested in Ruby and compilers, Vidar Hokstad has published the first two parts of a tutorial called “Writing a compiler in Ruby bottom up” (part 1 and part 2). Even if you are not into compilers, it’s a rather interesting read.
Sun reaffirmed their commitment to Ruby this week, by announcing the Ruby Development Center on the Sun Developer Network. I like Sun’s serious efforts and fast paced development of both JRuby and NetBeans (whose 6.1 beta is now out).
A new project hit the frontpage of programming.reddit.com: StrokeDB. Odd name, I know, but if you are interested in CouchDB, you may also take an in-depth look at StrokeDB. It’s a project that sounds rather promising if properly implemented. In their own words: “StrokeDB is an embeddable distributed document database written in Ruby. It is schema-free, it scales infinitely, it even tracks revisions and perfectly integrates with Ruby applications.”. The developers had a talk at EURUKO 2008, the European Ruby conference that took place this past weekend. Videos from the conference are not up yet, but meanwhile you can equally enjoy the videos and slides from MountainWest RubyConf 2008 on ConFreaks, which has published a talk by Evan Phoenix and Ezra Zygmuntowicz, respectively about Rubinius and Merb.
Finally, last week I spotted a bug that made Ruby 1.9 (built from trunk) significantly slower than Ruby 1.8. After a bit of investigation I was able to single out that the problem concerned Mac OS X only. With some testing by Chris Shea, the exact culprit revision was isolated and the core team has already worked on a fix. It was a very prompt and impressive response by Matz and his team.
RubyGems
Eric Hodel has announced the release of RubyGems 1.1.0. Aside from bugfixes and a couple of minor features, the most welcomed improvement is a significant speed boost that makes the tool faster. If you’d like to hear Eric talk about Rubygems and his involvement with the Ruby community, this week InfoQ published an interview with him (the interview itself is from RubyConf 2007 though).
This is my first episode of “This Week in Ruby” so feel free to provide feedback if you found it useful or if you have suggestions for improving it. Thank you for reading!