Prepared exclusively for Jordan A. Fowler
Important Information
About Rails Versions
Railsis an evolvingframework.The coreRailsdevelopers are continually making changes,adding newfeatures, .xingbugs,and soon.Periodically theypackage up thelatest version ofRailsinto a release.These releases are then available to applicationdevelopers asRubyGems.
Thisbookis writtenforRails1.2.
As thebookisgoing topress the core teamhave created the codebasefor Rails1.2.However, theyhave notyetpackageditinto agem.Thisgives us a bit of aproblem.We want thebook to re.ect all thelatest andgreatestRails features,but we alsoknow thatitishardforfolks tojump through thehoops required toget the so-calledEdge version ofRailsinstalled on their systems. And until agemis available, the1.2features are only availableinEdgeRails.
Now,it may wellbe thatby the timeyougetyourhands on thisbook, the Rails1.2gemisout.It�fseasy to .nd out.Afteryou�fveinstalledRails(as describedinChapter 3, InstallingRails, onpage 31),bringup a command prompt and enter rails -v.Ifit reports �gRails1.2�horlater,you�fre.ne.
Ifinsteadyouseesomethinglike �gRails1.1.6,�hyou�fll need toupdatetoget the codein thisbook to run.We�fveprepared a snapshot of theRailsframe-work code that we used when writing thisbook.You caninstallitinyour ownRails applications as a temporary measure until1.2is released.
.
Createyourapplicationnormally.You�fll .nd thatit will containadirec-tory called vendor
.
Download http://media.pragprog.com/titles/rails2/code/rails.zip intoyour application�fs vendor directory and unzipit.It should create a newdirec-tory called rails
.
Inyourapplication�fstop-leveldirectory,issuethecommand
rake rails:update
OnceRails1.2is released,you caninstallit and remove thedirectory tree vendor/rails fromyour applications.
The version ofRailsfrom our web siteis not an of.cial release, and should notbe usedinproduction applications.
Dave Thomas
Prepared exclusively for Jordan A. Fowler
AgileWebDevelopmentwithRails
SecondEdition
DaveThomas DavidHeinemeierHansson
with LeonBreedt MikeClark JamesDuncanDavidson JustinGehtland AndreasSchwarz
The Pragmatic Bookshelf
Raleigh,NorthCarolina Dallas,Texas
Prepared exclusively for Jordan A. Fowler
Many of the designations used by manufacturers and sellers to distinguish their products are claimed astrademarks.Where thosedesignations appearinthisbook, andThePragmaticProgram-mers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters orin allcapitals.ThePragmaticStarterKit,ThePragmaticProgrammer,PragmaticProgram-ming,PragmaticBookshelf and thelinking g device are trademarks ofThePragmaticProgrammers, LLC.
Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (includingprogramlistings)containedherein.
Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at
