![]() |
READ THIS: Additional Errata List!
The book is based on an older version of Rails and you will not be successful running the examples with anything newer. I've successfully run EVERY example except one (chapter 8, Validating Against Inclusion in A List). I used Instant Rails 1.7 available from http://rubyforge.org/frs/?group_id=904.
The user name for MySQL is "root" with no password, so in the text where you use SQL at the console, leave off the -p flag, thus: mysql -u root InstantRails installs to a directory and does not tie itself into Windows so to delete it just delete the directory. To execute it, just execute the InstantRails.exe file in the directory. I put the book exercises in chapter directories in the existing \InstantRails\rails_apps directory for convenience. To get a command prompt for Ruby, click on the I to the left of Apache button in the InstantRails window, then click Rails Application and then Open Ruby Console Window. The system by default runs the web server Mongrel rather than WebBrick from the ruby script/server command and that works fine for the book. I may have missed some other details to get started as I did not write them down, so there may be a few things you need to rediscover for yourself. I'm running under Vista Ultimate x64 with IE8. In addition to the errata listed by the author (and maybe one or two listed elsewhere in the forum), below is my list of the remaining errata for the book. There are far more errors in the middle (but they are consistent errors) that in the later chapters. I only did a few of the end of chapter exercises so there may be more errors there. Beginning Ruby on Rails errata Pg. 42 last grey block, portion of code inside until-end should be indented Pg. 147, Step 8 C:\rubydev\ch05\modeler>ruby script/server should be C:\rubydev\ch05\textfield3>ruby script/server P 152: (three items) the second grey box (step 2) c:\rubydev\ch05\modeler>ruby script/server should be c:\rubydev\ch05\textfield3>ruby The text for step 3 http://localhost:3000/input.html should be http://localhost:3000/look/input The first line of the last paragraph crunch should be cruncher Page 155 Grey box in step 6: c:\rubydev\ch05\modeler>ruby script/server should be c:\rubydev\ch05\sessions>ruby Text in step 7: http://localhost:3000/look/input should be http://localhost:3000/look/at Page 191, grey box in step 1: c:\>cd \rubydev\ch07\store>ruby should be c:\>cd \rubydev\ch07\store> (adds more pages) Page 224, 226, 229, grey box in step 2: c:\rubydev\ch06\store>ruby script/server should be c:\rubydev\ch08\store>ruby script/server Page 226: in How it Works, delete the text: Please insert HIW end rule. Thanks. Pages 229, 233, 236, 239, 241, 243, 246 grey box in step 3: c:\rubydev\ch06\store>ruby script/server should be c:\rubydev\ch08\validator>ruby script/server Page 235, grey box in step 1 1..99 should be "1..99" Page 237, code under How It Works 1..99 should be "1..99" Page 238, first grey box 1..18 should be "1..18" Page 246 Delete last line of Step 2 Delete: <%= error_messages_for 'field' %> Listed errata for page 135 is wrong according to a web search, but neither the book nor the errata version work in an older version of Instant Rails. Page 268 c:\rubydev\ch09\router>ruby script/server should be c:\rubydev\ch09\cookies>ruby script/server Page 273 (same error as page 274 in existing Errata) Last grey box, <== should be <= Page 297 step 8 c:\rubydev\ch10\router>ruby script/server should be c:\rubydev\ch10\xml>ruby script/server Page 301 step 4 c:\rubydev\ch10\router>ruby script/server should be c:\rubydev\ch10\xml>ruby script/server Page 301 step 7 c:\rubydev\ch10\router>ruby script/server should be c:\rubydev\ch10\helpers>ruby script/server Page 306 and 307, steps 5, 6, 7, 8, and 9. the path: rubydev\ch10\helpers\app... should be: rubydev\ch10\shared\app... Page 307 step 7 c:\rubydev\ch10\router>ruby script/server should be c:\rubydev\ch10\shared>ruby script/server page 319, top grey box (part of step 5) the line: :locals => { :variable1 => "indeed", :variable2 => "definitely" %> should be: :locals => { :variable1 => "indeed", :variable2 => "definitely" } %> page 332, next to last line on page: responseXml should be: responseXML page 333, in the first block of code: request.responseXml should be: request.responseXML page 339, last grey box @term = request.raw_post should be: @term = request.raw_post.chop request.raw_post appears to leave a trailing delimiter on the string. Chop removes it. page 341 @term = request.raw_post should be: @term = request.raw_post.chop Pg. 347 Exercise 2 solution, part 5=>7 should be 6=>7 |
Book out of date?
George
Are you suggesting that I should just go and get a more up to date book? Rgds Barry |
I liked the book (except the errors) and I have not done enough Rails to know how much the changes for Rails 2 not learned from the book will annoy me. I recently picked up the book "Simply Rails 2", but have not started it yet.
Rails 2 came out at the end of 2007 and we are now almost three years from then, and Rails 3 is now in beta. Software has bugs, books have bugs. You have to start someplace. Learning the most common structures of the earlier versions will allow you to read older code. |
| All times are GMT -4. The time now is 06:25 AM. |
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.