This Week in Rails (July 26, 2008)

Welcome to the fourth edition of This Week in Rails, a weekly (and occasionally fortnightly) report with highlights from the Rails community.

David broke the news of the availability of confirmed and scheduled talks at RailsConf Europe which will be taking place this coming September. As you can see there will be a lot of exciting material this year, too.

The e-book Ruby on Rails 2.1 – What’s New is now available in 7 languages: English, Portuguese, Japanese, Simplified and Traditional Chinese, Italian and Korean. A Spanish version is coming as well. Olé!

A couple of weeks ago I took a close look at three Rails 2.1 database related bugs. On the same day, Phusion Passenger 2.0.2 was released. This edition backports a few bug fixes, including one for a small memory leak, and as such it’s highly recommended for anyone using Passenger 2 (aka mod_rails).

Kawaii is a web-based utility like script/console. The output of the inserted expression is visually appealing when compared to the one we’re used to in the shell. Speaking of shiny things, version 2 of the Open Flash Chart plugin was released. This page shows a few wicked cool, professional looking charts (and their code) that can be generated with it.

The article Mulling Over Our Ruby On Rails Full Text Search Options discusses a few possible options for performing full text searches in Rails applications. When it comes to Sphinx, there are then two prominent plugins: UltraSphinx and ThinkingSphinx. Rein Henrichs from Hashrocket, compares the two approaches in his post titled A Thinking Man’s Sphinx.

The team behind Rails-Doc.org added a few more functionalities, including the ability to document the API for multiple versions of Rails.

Other noteworthy articles were the following:

Ryan Bates was interviewed by FiveRuns and his insightful answers are reported in Rails TakeFive: Five Questions with Ryan Bates. He also published a couple of new railscasts on Liquid safe templates and on Session Based Models.

Rails Envy podcast number 39 was published this week. Check out also their hilarious video about Outdated HTML. And if you haven’t done so already, don’t miss the funniest voicemail and remix the Rails community has heard to date: We ain’t got no RSpec.

If you’d like to read more updates from the Ruby side of things, please head over to This Week in Ruby.

Posted in General  | 4 comments

This Week in Rails (July 11, 2008)

Welcome to the third edition of This Week in Rails, a weekly report with highlights from the Rails community. My apologies for the delay of this post, the past two weeks have been pretty crazy, so this edition covers the most interesting articles and news from the past two weeks.

Let’s kick off this report with a couple of maintenance releases by Jamis Buck. Both Capistrano 2.4.3 and Net::SSH 2.0.3 were published two weeks ago. If you use them, consider upgrading.

Rails 2.1 has been out for a while now, but in case you didn’t have a chance to catch up yet, this post collects several links to useful resources which will help bring you up-to-date.

The Pathfinder Development’s blog put out three highly interesting posts. The first is More Named Scope Awesomeness by Noel Rappin, while the second and third ones are Pretty blocks in Rails views and DRYing up Rails Controllers: Polymorphic and Super Controllers, both by Josh Symonds. Another good (and quick) recent read about controllers, was MVC: How to write controllers.

The same Noel also published the second part of “Developing iPhone applications using Ruby on Rails and Eclipse” for DeveloperWorks (part 1 and 2).

FiveRuns released a valuable gem called data_fabric which adds support for sharding and replication to Active Record. The same company also has a contest up and they’re offering two free tickets to RailsConf Europe in Berlin. Speaking of conferences, Fabio Akita announced that there will be a Rails Summit Brazil 2008 this coming October in São Paulo. This will be the first event of its kind for the Rails community in South America.

An improved version (i.e. 1.1.1) of the Oracle enhanced adapter was released, as well as version 0.9.5 of the IBM_DB adapter for DB2 and Informix, which adds support for Rails 2.1.

In purely chronological order, I found the following articles to be worth pointing out: Speed up slow Rails development in vista – a handy tip for developers using Vista, Adding Google Maps To Your Rails Applications, Live fulltext search in Ruby on Rails and Useful Flash Messages in Rails.

The Railscasts website published two new episodes, one on testing through Selenium, and another on semi-static pages.

Finally, let’s close this edition on a lighter note. The next time you are about to create an acts_as_an_evil_genius plugin or other imaginatively named one, think about this post. ;-)

If you’d like to read more updates from the Ruby side of things, please head over to This Week in Ruby.

Posted in General  | 7 comments

This Week in Rails (June 26, 2008)

Welcome to the second edition of This Week in Rails, a weekly report with highlights from the Rails community.

Ruby Vulnerabilities

As previously reported by Jeremy Kemper, serious vulnerabilities have been discovered for the main Ruby implementations. The official advisory suggests an upgrade path, but there have been several reports of segmentation faults when using Rails with the patched Ruby 1.8.5 and 1.8.6 versions. The Phusion team has published a patch for Ruby 1.8.6-p111, but as things stand now, it hasn’t been included by the Ruby core team (yet).

If you are using Rails 2.1, Ruby 1.8.7-p22 seems the way to go. Unfortunately, Ruby 1.8.7 is not compatible with previous versions of Rails. If you decide that it’s time to upgrade your applications to Rails 2.1, this article features some handy tips, while this other one warns you about a few gotchas.

Those of you who’re running a version of Ruby that shipped with Mac OS X should wait for the next Apple’s Software Update.

Ajax

Rails is opinionated software, but its support for plugins clearly demonstrates a certain openness to diverging opinions on non-core issues. So while most of us mainly use Protoype, it is fairly common to see folks adopting other JavaScript frameworks as well, particularly jQuery.

Last week Jim Neath published a nice overview which compares jQuery with Prototype, and provides information about using jQuery with Rails through the jRails plugin.

Whatever your Ajax framework of choice is, you may be interested in the new Google Ajax Library API to improve the performance of your applications. Thanks to the tutorial Using Google Ajax Libraries API with Ruby on Rails (soon to be incorporated into a plugin) you can start adopting the API with Rails right now.

MVC

Rails 2.1 adds named scopes, which greatly simplify writing “find logic” within your Active Record models. It’s an extremely useful feature which is well explained in this write-up aptly titled, Named Scopes Are Awesome (we agree). Checkout also Ryan Bates’ railscasts on the subject: named_scope and Anonymous Scopes. You may also be interested in this week’s railscast about Caching in Rails 2.1.

Three other compelling Active Record related posts were, Smart Model, Dumb Controller, Bulk insertion of data with ActiveRecord and Timestamped Migrations on how to make “classic migrations” an available option (see ticket).

Michael Bleigh published a tutorial about dealing with subdomains in Rails applications through the SubdomainFu plugin (which appears to be flexible and very straightforward to use).

XP programming practices such as Test-Driven Development are very popular within the Rails community, but there are still many developers who see testing as a chore. Josh Nichols wrote an overview called A walk through of test-driven development with shoulda that shows you how easy it is to apply TDD to your Rails projects. In this specific case, he adopted the Shoulda plugin which seamlessly adds some assertions, helpers and macros on top of the Test::Unit framework.

Documentation

Aside from api.rubyonrails.org there are many alternatives for quickly visualizing the documentation of the Rails’ API. Last week a new one was launched: rails-doc.org. The current version features rapid searches and user annotations. This last feature in particular has the potential to become truly useful.

Deployment

If you are using Apache and mod_rails, you may want to read this article which provides information about a newly released module called apache-upload-progress.

Finally, Jason Crystal wrote a tutorial for packaging Rails applications for offline use on Mac OS X 10.5.


We’re done for this week. If you’d like to read more updates from the Ruby side of things, please head over to This Week in Ruby.

Posted in General  | 19 comments

Multiple Ruby security vulnerabilities

Drew Yao at Apple uncovered a handful of nasty security vulnerabilities affecting all current versions of Ruby. The details are still under wraps because an attacker can DoS you or possibly execute arbitrary code—holy crap! Better upgrade sooner than later.

According to the official Ruby security advisory, the vulnerable Rubies are:
  • 1.8.4 and earlier
  • 1.8.5-p230 and earlier
  • 1.8.6-p229 and earlier
  • 1.8.7-p21 and earlier

Those of us running Ruby 1.8.4 or earlier must upgrade to 1.8.5 or later for a fix. Those on 1.8.5-7 can grab the latest patchlevel release for a fix.

(Please note: Ruby 1.8.7 breaks backward compatibility and is only compatible with Rails 2.1 and later, so don’t go overboard!)

Posted in General  | 78 comments

This Week in Rails (June 16, 2008)

This is the first edition of This Week in Rails. As announced by Gregg Pollack a few days ago, this weekly column will cover highlights from the Rails community. My aim is to provide you with a status update as if you’d gone on holidays for a week. I will try to be consistent and publish once a week on Sunday or Monday. Being my first shot, I’ll rely on your feedback to verify that I’m on the right track and that this is useful to you; so please feel free to express your opinion in the comment section below.

With Rails 2.1 out, most developers are looking forward to upgrading their skills (and projects) to the latest release. If you’re one of them, I strongly recommend that you check out the second edition of Carlos Brando’s Ruby on Rails 2.1 – What’s new free e-book, which is available in both English and Portuguese, with an Italian translation currently in the works as well. You can also read Rob Anderton’s excellent overview of Rails 2.1’s improved caching capabilities, as well as its built-in support for memcached.

Last week, Phusion announced the first release candidate of Passenger 2.0 (aka mod_rails). This release introduces support for Rack, opening the door to alternative web frameworks as well. In the same announcement, Ruby Enterprise Edition was formally released. Despite the “Enterprise” label, this is a fully Open Source version of Ruby whose main claim is a reduced memory footprint on Linux and Mac OS X.

Speaking of Enterprise, Dr Nic has released version 1.0.2 of his Composite Primary Keys gem. Starting from version 1.0.0 it finally catches up with Active Record 2.1. Erubis, the fast alternative to ERB, has rolled out support for Rails 2.1 as well, in their 2.6.1 version. A week later, version 2.6.2 was released and it includes support for Ruby 1.9 as well. You can install it by running gem install erubis or by downloading it from RubyForge.

Last week Ryan Bates put out another two Railscasts. The first is about how to contribute to Rails using Git and is, needless to say, highly recommended. The second one is in regards to substituting pagination with the effect of endless scrolling, like DZone does. As pointed out, there are plugins that do this, but Ryan’s approach builds it from scratch and is definitely worth checking out.

Other interesting articles were: a concise guide to using the Thinking Sphinx plugin (along with the pre-requisite Sphinx primer), Easy and Flexible Breadcrumbs for Rails even though they are clearly not everyone’s cup of tea, and lastly GemPlugins: A Brief Introduction to the Future of Rails Plugins.

In conclusion, two announcements were previously reported in this blog, but they are both worth repeating. The first is the release of Capistrano 2.4 and the second is that registration has opened up for RailsConf Europe 2008. The conference will be held in Berlin, Germany from the 2nd to the 4th of September. By registering before July 15th, you can save up to 150 euros.

That’s it for this week. As you can see there is no shortage of material, given that we’re such an active community. If you’d like to read more updates from the Ruby side of things, please head over to This Week in Ruby.

Posted in General  | 13 comments

Two New Weekly Columns

I’d like to introduce two new contributors to the Rails blog.

First up is Chu Yeow. Chu has been putting together weekly Living on the Edge blog posts where he covers what’s been going on in Edge Rails. It seemed to me like it should be on the official blog, so expect to see his weekly updates showing up here shortly.

Secondly is Antonio Cangiano. Antonio started doing blog posts entitled This Week in Ruby a few months back which, as you might expect, cover all the significant events of the prior week. Antonio has agreed to move his weekly “Rails” stories over here, so we can all benefit from getting a summary of what’s going on in the neighborhood.

Then I should probably say a word about me, it’s not like I’m on the core team or work at 37 Signals so why am I here? I’m Gregg Pollack, one of the Rails Envy guys, and I’m here to help cover stories and help shape up the RubyOnRails.org website so the real core team can focus on coding.

So if you have any Rails stories that belong on here please email me (Gregg at RailsEnvy). Worst case scenario I’ll cover it on the next Rails Envy Podcast.

Posted in General  | 9 comments

Pratik joins core, retired members go alumni

We’re shaking up the Rails core group a bit. First, please welcome Pratik Naik as the newest member of the group.

He’s been doing great work all around the framework and has been spearheading both the documentation branch in git and a thorough cleanup of Action View internals. We’re really happy to hand him the commit keys to the repository.

Second, we’ve created the Rails core alumni for all the proud members of the core group who are no longer in the day-to-day improvement of the framework itself. All of the alumni are still busy working in the Ruby on Rails ecosystem, but either have their hands full with their business or has dedicated their open source time to other initiatives.

We’re incredibly grateful for all the works you guys have done for Ruby on Rails over the years. And you’re all welcome back in the active core group any time you decide. Thanks guys!

Finally, this means that the current active core group is about half its former size. We’d like to add a few more to that, so hopefully we can pick a few more people who’ve been doing varied work on the framework for a sustained period of time soon.

Posted in General  | 26 comments

Rails Rumble 2007

It’s that time of the year again: time for another Rails coding competition. In the spirit of the previous Rails Day contests, Rails Rumble challenges teams of up to four to create the best application possible in just 48 hours. This year’s competition is a little bit differently this time around, so checkout the rules. Judging is now performed by the community, allowing anyone to signup and choose their favorites. Also, your app will be provided a VPS to host the application through the end of October. How cool is that?

If you want to compete, you need to organize quickly, the contest runs on September 8th and 9th.

Posted in General, Sightings  | 8 comments

#rails-contrib and rubyonrails-stacks

RailsConf gave birth to a number of new outlets for sub-communities within the Rails family:

#rails-contrib is a new IRC channel on freenode for contributors to Rails. The Rails core team will hang out there to answer questions, discuss patches, and generally interact with anyone doing implementation work for the Rails framework. It's not meant for general chatter, though. Or for how to use the framework. It's strictly for implementational issues and the contributors working on those.

rubyonrails-stacks is a new forum to discuss how we can get standardized set of images going for Rails that can be deployed on any Xen host or even EC2. I posted a welcome with more details on the forum.

Posted in General  | 3 comments

Javascriptian REST

Eric Mill went ahead and created Jester, a library that lets you manipulate your Rails-style resources with javascript models. I think it’s great that we’re seeing implementations in other languages. This python port of Routes implements map.resources, can a python port of ActiveResource be far behind?

Posted in General, Sightings, Tricks  | 14 comments

Shiny new Subversion and Trac cluster

You’ve all noticed the excruciating Rails svn updates and Trac molasses in the last couple of weeks. Following the release of Rails 1.2 we thoroughly overwhelmed our development server, no small feat for a hefty dual Xeon. Congratulations, all, for your hearty Rails appetite! Your sustained Mbps say more than words possibly could.

Our friends at TextDrive have stepped up once again to keep Rails development running smoothly and your production apps deploying predictably. Please give a warm welcome to our new development cluster, a load-balanced crew of SunFires and Thumpers hosting Trac at dev.rubyonrails.org and Subversion at svn.rubyonrails.org.

Subversion will remain available at the old dev URL so you needn’t touch your live apps. Feel free to migrate to the new URL at your own speed.

Posted in Edge, General, Horizon, Releases  | 6 comments

Using SQLite3 with Rails

If you are using SQLite3 with a Rails application, make sure you are using SQLite3 3.3.7 or earlier. Versions after 3.3.7 incompatibly changed the way in which default values are stored, making it so that current versions of Rails get into quoting issues and problems with columns with NULL defaults.

The source code for version 3.3.7 may be downloaded here: sqlite-3.3.7.tar.gz. Likewise, a pre-compiled binary for Windows is available here: sqlite-3_3_7.zip.

I’ve got a ticket open on the SQLite3 trac about this (right here ); hopefully this will be recognized as an unacceptable change for a point release and will be reverted.

Posted in General  | 14 comments

Capistrano mailing list

After getting all inspired by Kathy Sierra’s keynote at the RailsConf last week, and reflecting on the requests I’ve received for a Capistrano-specific mailing list, I decided it was time to do something about it.

(Btw, you can read more about Capistrano in the manual.)

So, I started a mailing list for Capistrano. Currently, it is intended for any and all discussion related to Capistrano—sharing recipe files, relating success (or horror!) stories, posting patches, discussing tips and techniques, etc. So if you use Capistrano, or want to be using Capistrano, go ahead and sign up! You can join by sending an email to capistrano-subscribe@googlegroups.com, or by using the Google Groups web interface at http://groups.google.com/group/capistrano.

Let the good times roll!

Posted in General  | 2 comments

Rails is 2 years old

It seemed to have slipped all of our minds, but yesterday, the 25th of July marks the 2 year anniversary of Rails’ release.

Here’s David’s announcement email to the ruby-talk mailing list.

Cheers to you early adopters.

Posted in General  | 18 comments

David Heinemeier Hansson's RailsConf 2006 keynote now online

David’s RailsConf 2006 keynote, Discovering a World of Resources on Rails, is now online.

In this talk he announced the new ActiveResource project, for consuming REST web services and evangelized his new infatuation with regimenting his domain into simple CRUD operations.

You can get the slides and a slice of David’s point of view on all this, over at LoudThinking.

For those twitching at the flash video player, Ruby Central will be making the footage available in the future in an unflashy format.

Posted in General, Sightings  | 15 comments