Stress testing your protected pages

David came up with a quick tip for anyone stress testing protected pages with a stateless tester, such as siege.

  1. Log in with your browser
  2. View the cookies and find the session id (Firefox has a handy cookie search tool)
  3. Prepend the queries with ?_session_id=YOURSESSIONID

Now, any requests made will be as though they came from your account.

Do you have any other handy tips for stress testing your Rails applications?

Rails Recipes release candidate now available

Dave Thomas has just announced that the first release-candidate of Rails Recipes is now available. What that means is that the book is essentially in its finished form. It’s had a great beta run, with a lot of praise and good feedback. Now that it’s been put through its passes, it’s pretty much ready for primetime, sporting 70 solutions to your real world programming challenges. If you’ve been holding off, now is a great time to get in on what is shaping up to be the de facto companion to Agile Web Development with Rails.

If you already bought the PDF, you can get the latest copy for free.

If you haven’t, what are you waiting for? Order it here.

Rails training for a good cause

Here’s a good idea: Use a hot new technology to help kids prepare to create the next hot new technology.

Amy Hoy, Ezra Zygmuntowicz and Jeff Casimir are doing just that and calling it Workshop for Good. On Saturday, May 20th and Sunday, May 21st, in Washington, D.C. Amy, Ezra and Jeff will be teaching an intensive Rails workshop. All (i.e. 100%) of the proceeds from attendance fees ($400 regular, $200 for students) will go towards buying stuff like computers for the students of César Chávez Public Charter School.

Amy Hoy has been giving back to the Rails community with education almost since day one. You may have gotten over the initial hurdles yourself with one of her accessible tutorials or clarifying visual aids. Ezra Zygmuntowicz singlehandedly built one of the first substantial real world Rails applications, the Yakima Herald Website and is currently working on a Rails book for the Pragmatic Programmers. Both bring substantial experience with Rails to the workshop.

Last I heard there were 23 spots left so get on the list while you still can. Take this opportunity to both learn Rails and promote a great cause. Killing two birds with one stone is seriously agile.

Sign up here

UPDATE: There are only 8 seats left! If you were thinking of coming, now is your chance to get in.

Ruby for Rails book now available in full

David A. Black’s book Ruby for Rails is now available in full in PDF form (paper copy scheduled to follow the first week of May). The book covers the ins and outs of Ruby with a focus on Rails. It is aimed at Rails developers who want to gain a deeper understanding of Ruby beyond what Rails builds on top of it.

Taking a look at the table of contents you’ll get a sense of how much territory the book covers. There are two sample chapers for free. One is on Organizing objects with classes and the other on Scalar objects.

David Black is an ideal guide through Ruby, having been a member of the community for over 5 years and as the director of Ruby Central, the not for profit organization that brings you RubyConf every year.

It’s no secret that Ruby is one of the key ingredients in Rails’ special sauce. If you are a Rails developer, you owe it to yourself to be a Ruby master. Ruby for Rails is a great place to start.

Rails 1.1.2: Tiny fix for gems dependencies

The new gem version dependency system from Rails 1.1.1 needed a few tweaks to work properly and to stop throwing meaningless warnings. This tiny release makes up for that. To install:

  • gem install rails
  • rake rails:update:configs (to get the latest config/boot.rb)

This release also signals our new commitment to do more tiny releases from the stable branch, which only gets bug fixes. So it will not be uncommon to see bi-weekly tiny releases in the 1.1.x series while we continue to add features to the forthcoming 1.2.0.

Learn about Ruby on Rails from oracle.com

Richard Monson-Haefel has a simple tutorial up on oracle.com that describes how and why to use Ruby on Rails with an Oracle database. It’s great to see big organizations like Oracle take Rails serious enough to commission articles about it for their site.

It’s also fitting since the Oracle database adapter in Rails now has a really strong team of contributors keeping it sharp. Michael Schoen in particular has done a fantastic job. He has set up an automated testing server for Oracle, so any new revision of the framework is automatically tested and run against Oracle. If any failure occurs, an email is sent out.

We invite guys working with DB2, MS SQL, Sybase, and the other commercial databases to do the same.

Plug into HyperEstraier with acts_as_searchable

Patrick Lenz has announced his acts_as_searchable plugin which integrates ActiveRecord models with HyperEstraier, an open source fulltext search engine.

It’s available as a gem so you can just do sudo gem install acts_as_searchable.

You can then take a look at the API docs, which provide a few examples.

Full text searching just got as simple as:


class Article < ActiveRecord::Base
acts_as_searchable
end

Article.fulltext_search(‘biscuits AND gravy’)

Rails 1.1.1: Fixing a slew of minors (but you must still freeze Typo)

Rails 1.1 was a big upgrade with a lot of new features and we’ve been working hard since its release to polish off the kinks revealed after it was deployed to the masses. Rails 1.1.1 contains fixes for things like Prototype memory leaks in IE 6, Oracle adapter runnings, and a number of compatibility tweaks to make most older applications work.

This release still doesn’t work with Typo, though. And it won’t. Instead you must freeze Rails 1.0 to vendor/rails if you run Typo 2.6.0 while we await the new release from the Typo team that will be fully 1.1 compatible. Read more about Typo and how to freeze Rails.

This is the release we recommend that hosting companies upgrade to. If you still haven’t frozen your application and it for some reason doesn’t work with Rails 1.1.1, don’t run crying to them. We screwed up in the release notes of the last release by not telling people that Typo would break, but now that this information is spread far and wide, it’ll rest on your shoulders to make sure you’re frozen and stay cool.

If you still haven’t upgraded to Rails 1.1, checkout the original announcement for a run-through of all the features.

For the full story, see the changelogs: Rails, Action Pack, Active Record, Active Support, Action Web Service