GrailsInAction / graina2

Source code for the 2nd edition of Grails in Action
90 stars 91 forks source link

Downloading code for each chapter #23

Open philfriesen opened 11 years ago

philfriesen commented 11 years ago

Please consider adding instructions for downloading the GitHub code at the beginning of each chapter. Once you fix the Profile.groovy belonging to User problem, it works flawlessly if I replace my hubbub directory with the hubbub subdirectory for that chapter.

The big gotcha, of course, is that the code is specifically for v2.2.1. At the beginning of the book, it says to download the latest grails version. That leads to all kinds of problems. Using v.2.2.1 avoids the hassle of upgrades, googling config changes needed for jar incompatibilities, etc.

I think you should consider suggesting how to download and organize multiple versions of grails, and then swap them in and out with environment variables. Maybe not many people need that kind of advice, but the ones that do will probably really appreciate it.

pledbrook commented 11 years ago

Another option would be to use the Grails wrapper, grailsw, which would mean you don't even need to download Grails (the wrapper downloads the appropriate version for you).

I think instructions at the beginning of each chapter could get a bit repetitive, but you're right that we should make it clear how to work with the sample code on GitHub.

BTW, I wouldn't recommend manually downloading and managing multiple versions of Grails. You're much better off using gvm.