January 3rd, 2008
Yes, it’s a plug for myself and it’s shameless:
Whatever Zed Shaw may say about Rails its community, Rails has done a huge part in making web development fun again for jaded web developers (first-time web developers probably won’t be able to tell the difference), and more importantly, raising the profile of Ruby more than any other Ruby project/library/framework/tool ever did (and I’m sure we’re all constantly rolling our eyeballs at the new web frameworks that’re so terribly familiarly Rails-like). Hell, I bet at least 90% of Rubyists now wouldn’t even be Rubyists if they hadn’t come across the web framework that could 2 or 3 years ago. So yes I’d still be contributing to Rails so that it can make my life as a web developer easier, thank you.
I think I had about 18 accepted patches in December 2007 Rails Hackfest (a few of the patches were not attributed properly in the Hackfest due to technical issues with the Rails Hackfest site).
Probably the only significant patches were:
- Allowing a proc to be set for
ActionController::Base.asset_host (changeset 8421).
to_xml should not automatically pass :procs to associations included with :include (changeset 8258).
Of course Ruby 1.9 compatibility was a big deal in December 2007 since that Ruby 1.9 was targetted to be released on Christmas (changesets 8369, 8309, 8398, 8397, 8412). Yes, I know, Ruby 1.9 is a development release.
There were also broken tests to be fixed (changeset 8271), bugs to be fixed (fixing Array#to_sentence), and some refactoring (changesets 8343 and 8522).
And what would patching Rails be without random documentation fixes (changesets 8457, 8471, 8472, 8280, 8279, 8278, 8521). The API documentation always needs a hand, so if you see any outdated or incorrect documentation, or think you can improve them with better examples or whatever, just submit a patch (it’s easy and should take you all of 3 minutes).
This month’s hackfest has a terribly attractive top prize of a RailsConf ticket. Too bad I won’t be able to take part in this month’s hackfest since winners of past month’s hackfest are automatically excluded from the next’s. But maybe you can ;).
January 2nd, 2008
Gregg Pollack of Rails Envy (the guys behind your favorite Ruby on Rails vs everything commercials) asked me recently whether I could provide them with weekly updates of changes on edge Rails for the Rails Envy Podcast (which is often hilarious besides being informative), seeing as I am already keeping up with developments on the Rails trunk while doing my small part contributing to Rails. Of course, I responded with a +1.
The podcast is now available and contains only abbreviated notes about the changes that I’d sent over to Gregg, so here’s the detailed version of changes on edge Rails from the release of Rails 2.0.2 (17 Dec 2007) to the day the podcast was recorded (30 Dec 2007).
Noteworthy changes on edge Rails: 2007-12-17 to 2007-12-30
Native mongrel handler
A native Mongrel handler has been introduced. This is so that it can be worked on independent of Mongrel’s release cycle (the Rails handler is currently in the Mongrel codebase). Jeremy Kemper (bitsweat) has already made a minor performance improvement by moving the mutex from the handler itself into the dispatcher. This means that as Rails gets more threadsafe, the Rails team can push the mutex further down so that it’s not a (scary) giant lock (the existing Mongrel Rails handler has a synchronized block around Rails’ dispatcher).
Note: The native mongrel handler is not used by default at this time on edge Rails.
Caching branch for Rails 2.1
A caching branch has been introduced, targeted for Rails 2.1. Other than being a big refactoring, there’s also native cache key management (e.g. Product.find(5).cache_key # => "products/5") and memcache integration is also being looked at.
Ruby 1.9 compatibility continues…
Yup, work on Ruby 1.9 compatibility for Rails continues. Rails is fortunate to have committers and contributors who are so keen on being 1.9-compatible - free performance gains are hard to turn down after all. There’s been lots of patching going on to deal with the changes in Ruby 1.9 (Unicode changes, new syntax, deprecations, etc.).
Yes, the Rails committers and contributors working on 1.9-compatibility are fully aware that Ruby 1.9 is a development release, but nothing’s lost in making sure Rails is compatible with a version of Ruby that will eventually be a production version of Ruby. Besides, I think most of the 1.9-compatibility contributors have a dream that sometime soon, when Ruby 1.9 becomes “stable” enough, we’d be running our Rails applications on Ruby 1.9 for a free performance boost.
Too bad running Rails on Ruby 1.9 is not really possible at the moment since other projects like Mongrel need to be updated for Ruby 1.9 as well, first.
Bugfixes
- The new TestCase subclasses (
ActionController::TestCase,
ActionMailer::TestCase) introduced in Rails 2 have a gotcha. This has been fixed quickly by Josh Peek.
- Fixed a bug where trying to :include for a belongs_to association inferred the foreign key incorrectly from the class name, rather than from the association name (changeset contributed by Jonathan Viney). Code is probably easier to understand:
class Post < ActiveRecord::Base
belongs_to :main_category, :class_name => 'Category'
end
Post.find(:first, :include => :main_category)
# => ActiveRecord::StatementInvalid: Mysql::Error: Unknown column
'posts.category' in 'on clause'
Optimizations
I can has feedback nao plz?
Please leave any suggestions for improvements you may have - about anything really: format, level of detail, what you’d like to see, whatever. Until next week…