Wrox Programmer Forums
|
BOOK: Ruby on Rails for Microsoft Developers
This is the forum to discuss the Wrox book Ruby on Rails for Microsoft Developers by Antonio Cangiano; ISBN: 9780470374955
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ruby on Rails for Microsoft Developers section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 17th, 2009, 07:14 PM
Registered User
 
Join Date: May 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 10

Just a note about the REST Web Service examples in Chapter 10, pgs 383-388:

If you're using Rails 2.3, and you download the Chapter 6 code (without authentication), you'll have to rename
Code:
app/controllers/application.rb
to
Code:
app/controllers/application_controller.rb
and change
Code:
RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION
to match your Rails version.

another way to fix this is to run:
Code:
rake rails:update
I kept getting errors while trying to follow along in the book. It took me about 10 minutes to figure out these changes and to realize you should follow the CRUD sections in CRUD order. If you follow in the order presented in the book, you will have errors because there are no records in the database to read, assuming you've downloaded the code and started right away.

I may have been a bit hasty in following the examples, but this should help at least with the application_controller change in Rails 2.3.
 
Old May 17th, 2009, 11:35 PM
Registered User
 
Join Date: Apr 2009
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Smile

Hi Jim,

thanks for your comment and for pointing out the version upgrade to fellow readers.

The book is best followed using Rails 2.2, even though last minute pointers for Rails 2.3 have been provided. For example, I point out the usage of the command rake rails:update to upgrade important files like application.rb at page 416, in the chapter dedicated to going into production.

Regarding the order, the project in Chapter 10 "consumes" the simple blog application developed in Chapter 6, as pointed out on page 384. By that chapter the reader will have already created sample articles, therefore the "Read" section of Chapter 10 wouldn't cause any errors. If you didn't follow the progression throughout the book, then yes, creating a couple of sample record progressing in the CRUD order is a valid alternative.

Cheers,
Antonio

Last edited by Antonio Cangiano; May 18th, 2009 at 05:56 PM.. Reason: Small typo.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 10 gogeo BOOK: Beginning Access 2003 VBA 1 January 22nd, 2006 09:41 AM
Chapter 10 SSL elrond BOOK: Beginning Cryptography with Java 3 January 20th, 2006 10:58 AM
Chapter 10 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 March 29th, 2005 09:35 AM
Chapter 10 columbiasmiles JSP Basics 0 May 17th, 2004 08:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.