This project is archived and is in readonly mode.

#3224 ✓invalid
Sam Ruby

2.3.4 routes regression

Reported by Sam Ruby | September 17th, 2009 @ 03:07 PM

The following script described in section 21.2 of Agile Web Development with Rails, Edition 3 behaves differently in Rails 2.3.4 than it did in any prior version of Rails, and in fact, differently than the current Rails 3.0 head does:

In particular, the way this code interacts with the following predefined routes in Depot changed:

The script actually can run in irb, whereas the book describes script/console. To see the script/console behavior under irb, change the initial require statements to: require 'config/environment.rb'.

Again, this behavior is specific to 2.3.4, this worked in Rails 1, and all versions of Rails 2 up to and including 2.3.3. It also works in 3.0-pre.

The simplest way to reproduce this is as follows:

$ git clone git:// $ cd awdwr $ ruby makedepot.rb 6.1-21.2 $ cd work/depot $ irb ../../data/code/e1/routing/config/routes_for_blog.rb $ ruby script/console < ../../data/code/e1/routing/config/routes_for_blog.rb

Note that when the unmodified script is run under irb the last line output is:

=> ""

And when run under script/console the last line output is:

=> ""

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

Referenced by