Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK: Beginning Ruby on Rails
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Ruby on Rails
This is the forum to discuss the Wrox book Beginning Ruby on Rails by Steve Holzner Ph.D.; ISBN: 9780470069158
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 15th, 2010, 07:05 PM
Registered User
 
Join Date: Jun 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

Last edited by George Shaw; July 20th, 2010 at 07:09 PM. Reason: Added fix for pages 235, 237, 238
Reply With Quote
  #2 (permalink)  
Old August 24th, 2010, 08:32 AM
Registered User
 
Join Date: Jun 2010
Location: Dublin, Ireland
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to barryjogorman
Default Book out of date?

George

Are you suggesting that I should just go and get a more up to date book?

Rgds

Barry
__________________
Barry J O'Gorman
Dublin
Ireland
Reply With Quote
  #3 (permalink)  
Old August 24th, 2010, 11:38 AM
Registered User
 
Join Date: Jun 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
List of Notes and Errata weimenglee BOOK: Beginning iPad Application Development 5 July 26th, 2010 11:32 AM
Additional errata ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 October 15th, 2007 02:28 PM
Anyone have an errata list for the 1st edition? sum1els BOOK: Professional C#, 2nd and 3rd Editions 2 April 14th, 2004 12:39 PM
Additional Wizards huskie Access 5 August 22nd, 2003 06:59 PM
Read drop-down list validated in Excel KathleenS Excel VBA 1 August 10th, 2003 08:41 AM



All times are GMT -4. The time now is 12:31 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.