Rails 0.9.5: A world of fixes and tweaks

This release is mostly about polishing the Rails by closing holes, deficiencies, and subtle extensions to existing features. The long-awaited Directions and generator upgrade have been postponed to the next release. The highlights of this release is:

  • Rewritten reloading: Working in development with models and controllers reloading on every request now resembles “the real thing” a lot more by actually removing the model classes before reloading them. This fixes a bunch of subtle bugs and makes it possible to remove a method and see it reflected without restarting the application.
  • Create and update collections: Through calls like text_field "student[]", "last_name", it’s now much easier to get input tags like input name="student[123][last_name]"..., which together with the fact that Base#create, Base#update, Base#destroy, Base#delete, AssociationCollection#build, and AssociationCollection#create now all accept arrays enables handling of many records at once.
  • Stopping after render/redirect: Any before_filter can now terminate the chain by calling render or redirect and the pattern of redirect-and-return now works again. The first call to either render or redirect wins as well and subsequent calls are ignored.

That’s just three of the 37 changes, fixes, and additions available in Rails 0.9.5. You can read the full story in the changelogs for Active Record, Action Pack, and Rails.

This release shouldn’t require any changes to your application if you’re coming from Rails 0.9.4 unless you were relying on const_missing to load non-AR/AO/AC classes. In that case, you’ll have to start being explicit with require_dependency for the reloading to be triggered.

Pedrosa on Rails vs WebWork: 'Language DOES matter'

Joao Pedrosa has been using both Rails and WebWork and iterates five key points on why “…WW is clearly inferior to Rails in every aspect” before arriving at the following conclusion:

Although I think RoR is superior to all Java web framework I used so far, I really respect the WW guys for building this framework which is one of the coolest in Javaland (unfortunately still ruled by crapware like Struts) but there is absolutely NO WAY any Java framework can compete with RoR… just try to build some real life app with it to figure out yourself how much precious time you’ve been wasting until now.

Time to shutdown IDEA and launch TextMate, 2005 will definetly be the year of Ruby on Rails! :)

'Ruby on Rails is unbelievably good'

Daryl discovers Ruby on Rails:

Ruby on Rails is unbelievably good. It’s too good to be true almost… Quite honestly, in an afternoon I built a completely working web application without the fancy css frills and such mind you, but completely usable that would have taken me the weekend with other methods… I’m still kind of in shock as to how productive I was this weekend with RoR. And this was while learning how to program in Ruby.

Welcome to the new world, Daryl!

Rich clients with Rails and XUL

Zed Shaw put together a simple proof of concept application in a couple of hours to demonstrate the possibilities for rich clients in Rails and XUL. Being XUL, it naturally only works in Firefox and Mozilla, and being proof of concept, it still has plenty of stuff missing. But it does provide a window into the kind of applications Rails are capable of powering if you’re willing to limit the application to the Mozilla platform.

railsxul.png

UPDATE: Zed has explained how the prototype works and offers a few suggestions for Rails.

Celebrating six months anniversary!

On July 24th of last year, Rails 0.5 was released through RubyForge. It mustered 357 downloads in just five days. Today, fifteen releases later, we’ve pushed more than ten thousand gems and five thousand tgz/zip versions over the virtual counter. At the time of writing, the IRC channel holds 153 handles. We recently got Slashdotted and a ton of cool applications are coming out using Rails.

We’ve certainly come quite a long way in six months.

But its only going to get better. A lot better. Dave Thomas is writing the first book on Rails, the mystical 1.0 release is just 1-2 months away, and there’s a number of cool speaking engagements coming up at future conferences that’s going to push awareness even higher.

If you’re reading this, I salute you for being one of the early adopters (or at least interested) that has helped bring Rails this far. Happy half-birthday, Rails!

CD Baby leaves PHP behind for Ruby on Rails

Derek Sivers have just announced that CDBaby.com is about to embark on an application rewrite that’ll replace the 90,000 lines of PHP code with an alternative built using Ruby on Rails.

CD Baby is a very successful etailer of independent music. They list 82,443 artists that together have sold 1.2 million CDs! And unlike the cartels, CD Baby is all paying back to artists — $12 million has made it back into artists’ pockets.

Derek describe the reasoning behind his departure from PHP to Ruby on Rails as follows:

Now, with Rails, there are a team of passionate geniuses contributing to this web-making framework daily. It’s small enough that you can stay on top of it, and watch this framework get more and more powerful by the week. Improvements that are pragmatic not political. People using it to make effective websites, contributing to the shared framework around it as they go. Why not take advantage of all this brilliant work?

Congratulations, Derek! And congratulations to the star team of core Rails contributors that he has chosen to assist him in the transition: Jeremy Kemper (bitsweat) and Tobias Luekte (xal). Without a doubt two of the very finest Rails developers out there. Great choice!

Also, I love how Derek prefaces his comment section:

Please no flames about Python, PHP, Java, or MySQL. My choice to use Ruby + Postgres was due to my love of them, not hate of something else

Loving Ruby, loving Rails is not about hating something else. It’s not a zero-sum game where love must be balanced with equal amounts of hate.

Speeding up CGI access to Gem Rails

Jamis has a nice article demonstrating how he decreased the reload time from 2.4 seconds to just 1.1 seconds on CGI access to his Gem Rails application:

Rails’ preferred installation method is RubyGems, a convenient, powerful utility for installing Ruby libraries and applications. Unfortunately, that convenience comes at a price—loading a library via RubyGems adds some overhead. Recent releases of RubyGems have made some good progress in reducing that overhead, but it still exists.

If you’re running WEBrick or FastCGI for development, this is not an issue, though.

Beyond the 10,000th gem install of Rails

All the latest attention have spurred downloads of Rails to new heights and we just surpassed the 10,000th gem installation of Rails (not counting all the beta gem installs or svn:external setups)! On top of that, we have some five thousand downloads of the zip/tgz version for a total of around 15K in combined downloads. This encompasses all versions, so naturally there’s plenty of overlap and this doesn’t translate into 15K people working with the Rails (yet!).

So on this occassion, I’d like to take this opportunity to thank instead of berate other projects that have proven influential to the development of Rails.

Thanks to PHP for getting me into programming and teaching me how much immediacy matters. Thanks to Smalltalk for being an inspiration so far ahead in many areas where we’re still scrambling to catch up. Thanks to Java for being the birth place of many great ideas in frameworks such as Struts, Tiles, WebWork, Hibernate, and more.

Most importantly, of course, thanks to Matz and the Ruby community for proving such fertile grounds for creativity and achievement.

And now, let’s all hold hands and sing songs about spreading love, not hate.

'That application is so stupid'

Just as Patrick Lightbody recants his ill-guided charge, Geert Bevin — also involved with a Java web-framework, this time RIFE — picks up the torch and tries his best to scorch the earth anew:

About tadalist, that application is so stupid that I’m wondering how the hell it could have taken him 600 lines to write it. Also, the hugely hiped ‘killer application’ of RoR, Basecamp, is a total fraud imho. The screenshots look nice, and are nicely presented. So I did make an account and started using it. And honestly, everything they say is true, it sets itself apart in simplicity. Not difficult to write that in a few weeks.

It’s incredible how much vile bile that lies within the Java community. I’m beginning to understand why many of the defectors I’ve talked to are so happy about the Ruby and Rails communities. Oh well, back to the stupid, fraud applications.

Programmer needed for JSP to Rails conversion

Gately’s would like to dump their JSP-powered shop and upgrade to Rails. They’re looking for Rails talent to help them do just that:

We need a developer who is proficient in (and hates) JSP for a contract-to-hire position which would involve replacing a JSP app with a Rails app for a growing e-tailer in the Denver, CO area. Would prefer local talent, but would consider teleworkers from anywhere with the right skills. Please contact me (Solomon White, solo [at] gatelys [dotcom]) if you feel you might be a fit.