5 ms·
For new RoR programmers, is it recommended to just start in with Rails 3, or stick with Rails 2 until Rails 3 "stabilizes"? There are a bunch of Rails 3 books o
by pedoh 16y ago
For new RoR programmers, is it recommended to just start in with Rails 3, or stick with Rails 2 until Rails 3 "stabilizes"? There are a bunch of Rails 3 books out there; do they generally line up well with this release candidate, or are they full of old information that a new RoR programmer would stumble upon and not understand how to fix?
[EDIT] The three books I saw available that specifically mention Rails 3 in the title are available for pre-order, so hopefully they will be pretty up-to-date.
- cheald 16y agoI think it depends on what you're doing. If you're learning Rails just to learn it, go with Rails 3. If you're being asked to spec a Rails project, go with 2.3.8. Rails 3 isn't done cooking yet, and may potentially shift under you while you attempt to complete a project under a deadline while learning the stack - not a great choice, IMO.
- dhh 16y agoRails 3 is now done cooking from a feature perspective. That's why this release is a release candidate, not a beta or alpha. Rails 3 is the way to go for new projects.
- fuzzythinker 16y agoI got "rails 3 way" and "agile rails 4.ed". rails3way is pretty much a complete rewrite; its only 266 pages filled so far, but looks good. Agile rails is more finished than rails3way. They are both pretty good books, but if you want more of a "completed" book, agile seems to be the one closer to that. I'm learning RoR from scratch too. The recommended setup is to use ruby 1.9.2. Your first question really depends on what is your intention. If your primary focus is for job hunting, 2 may be the way to go. If you're trying to build something, I don't see much drawbacks (yet) on going to 3.
- jakemoffatt 16y agoGo to Rails 3, a lot of the ways of doing things in 2.X will be deprecated in 3.1 and removed in 3.2, so just save yourself the hassle. Rails 3 also cleans up a tremendous amount of code and removes a lot of the 'obtrusive' Javascript from your views. As far as 1.9.2, if you plan to do deployment (Even for testing) any time soon on Heroku (the coolest, if not the best hosting solution for Rails) then you may want to kick back to 1.8.7, because Heroku won't support 1.9.2 until a final is released.
- kyleslattery 16y agoI would jump right in to Rails 3. It's pretty great right now, and it's only going to get better.
- milesf 16y agoThe most up-to-date book is the free Rails Tutorial http://railstutorial.org http://railstutorial.org, which will be updated to Rails 3 soon after it's final is released. If you have an older book using an older version of rails, DON'T use Rails 3, use the version used in your book (DHH mentioned this on an episode of coderpath http://coderpath.com/posts/1 http://coderpath.com/posts/1)
- mhartl 16y agoThere's actually a semi-secret version of the Ruby on Rails Tutorial book already updated for Rails 3.0.0.rc: http://railstutorial.org/book?version=3.0.0.rc http://railstutorial.org/book?version=3.0.0.rc Shhh... Don't tell anyone! :-) (The official release of the Ruby on Rails 3 Tutorial book should happen some time in the next couple weeks, probably slightly ahead of the official Rails 3.0 release. Of course, the tutorial will also be updated after Rails 3.0 final drops.)
- philwelch 16y agoNow I have to start the tutorial all over again...but thanks! This should be a lot easier than looking up for myself how Rspec 2 works and so forth.
- matwood 16y agoJust so you know, Rails 3 RC plus all the associated dependencies with rspec now core dump on integration ('requests') tests even though controller testing works fine. It looks like there is a webrat/rspec usage issue. I assume they'll get it fixed in a few days.
- mhartl 16y agoI'm glad to know it's not just me. The tutorial book pins RSpec down to 2.0.0.beta.18 for just this reason. (It looks like 2.0.0.beta.19 is the one that has the problem.) Of course, I'll update the tutorial with the latest RSpec version once they fix this issue.
- mrduncan 16y agoThe list of changes in Rails 3.0 is fairly approachable if you understand the basics of Rails. I'd recommend taking a look for yourself - http://guides.rails.info/3_0_release_notes.html http://guides.rails.info/3_0_release_notes.html As far as whether 2.3 or 3.0 makes the most sense at this point, it depends. Personally, I have been working on a brand new project that I started with 3.0 beta 1 and haven't ran into any major headaches. That said, since you're new there is a lot more information out there regarding 2.3 (be careful, some is much older). To give you some better advice, why are you getting into Rails? Are you trying to get a project started/out the door/etc, or simply looking to learn it because it looks interesting/fun?
- ashleyw 16y agoI think now would be an excellent time to jump into 3.0. So much has changed since 2.x, practically every Rails developer, new and old, will be blogging, tweeting, debugging and asking and answering questions on StackOverflow about Rails 3, you'd be daft to lag behind and miss the opportunity.
- blantonl 16y agoother than "So much has changed since 2.x," I personally think it would be great for you explain why "practically every Rails Developer" should jump in to 3.0. Your comment is a given, right?, but other than to state the obvious, I'm curious as to your personal reasonings regarding this release.
- steveklabnik 16y agoThe biggest two for me are massive performance increases as well as unobtrusive javascript. Now, I haven't done any specific benchmarking with my apps yet, but the upgrade from ree to 1.9.2 seems to be fairly large from every benchmark I've seen, as well as Rails 3 itself becoming faster, due to the Merb influence. Unobtrusive JS is awesome; I never used Rails javascript helper stuff because I prefer jQuery to Prototype, and just wrote all of that stuff by hand. Now I can actually use helpers. Full HTML5 support is also nice, though I guess haml was already doing that for me.
- ashleyw 16y agoWhy wouldn't you? It's faster, it'll eventually have more support from the community, and has tons of improvements which should help with your productivity.