The rapid rate of change in Rails presents a considerable challenge to book authors that wish to include instructions on how to build a running application. Rails 2.3RC1 is no different. Released just two months and ten days after Rails 2.2, it includes quite a number of changes, for example:
Instead of uncommenting the following line in config/environment.rb:
The file app/controllers/application.rb has been renamed to app/controllers/application_controller.rb. Additionally, within that file, there no longer is a :secret hash to uncomment in the call to protect_from_forgery as it is no longer needed.
Additionally, as a release candidate, it is not surprising that there are bugs in the release. Apparently, storing non-ActiveRecord objects in a session is one such area: ticket, test-case. Hiding behind that bug appears to be another that I have not yet isolated into a minimal test case. The symptoms are the following error:
/!\ FAILSAFE /!\ Tue Feb 03 21:02:03 -0500 2009
Status: 500 Internal Server Error
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.include?
/home/rubys/.gem/ruby/1.8/gems/activerecord-2.3.0/lib/active_record/attribute_methods.rb:142:in `create_time_zone_conversion_attribute?'
And if my current project is any indicator, the single biggest RC1 new feature you should try and get in the book is Nested Attributes and the related Nested Object Forms. Of course, I’m just one data point.
It might keep book authors in general in business, but as this particular book is targeted at those who are getting started(*) with Rails, it is the expanding developer base that keeps this book in high demand. The rate of change doesn’t increase the market, it merely increases the amount of author time investment needed to keep up.
Don’t get me wrong, I’m not complaining. The real issue, however, is that to be successful in this market we need to figure out a release early and often strategy that works. At the present time with PragProg we have that for those who are willing to deal with PDF versions. Solving the problem for those who prefer print is a considerably tougher nut to crack.
Let’s take Pete’s example. If this book didn’t cover nested forms, that’s probably OK as that can easily be picked up once you master the content of this book.
Three months from now, there undoubtedly will be more “must have” features. If, by then, nested forms were a part of the underlying fabric of the book at that time, the book will be as valuable to people coming to Rails at that time as this draft is to people who are coming to Rails now.
(*) P.S. Don’t get the wrong idea. This book isn’t a read once and move on proposition by any means. When I want to learn something about Rails, I go to three places: Ryan Daigle, Rails API, and this book.
Just a note (since it’s sort of obvious, once you realize it, but baffling until you do): if your app uses any kind of customized script/server script, you’ll doubtless need a new one for Rails 2.3, since the latter now runs on Rack.
This last bit is cool. Among other things, Rails will automatically choose between Mongrel (if installed) and WEBrick (if not).
Answer by jaaronfarr for What's the best resource for learning Rails for a raw beginner?
Sam Ruby is still working on the latest edition of AWDWR. The beta book should be decent, the but the current speed of Rails development means most anything will be slightly out of date right now. That’s not going to be too important for an...
Answer by jaaronfarr for What's the best resource for learning Rails for a raw beginner?
Sam Ruby is still working on the latest edition of AWDWR. The beta book should be decent, the but the current speed of Rails development means most anything will be slightly out of date right now. That’s not going to be too important for an...