views:

310

answers:

8

I have been dabbling with Ruby for some time now and also was thinking of learning RoR they released a new version for it. :)

So now should I start learning RoR v1.2 or v2.x especially keeping the following in mind

  • I couldn't find any great free books/in-depth tutorials on RoR 2.x yet
  • I want to learn RoR with the eventual goal of doing some projects and hosting them (on services like heroku.com etc.)

Any advice?

+2  A: 
sudo gem install rails

Just go with whatever that installs (that is 2.0.x currently, 2.1 in a few months). RoR moves quickly and the best way to get support is to stay current.

Dave Cheney
This currently installs Rails 2.1.1, no? ;-)
webmat
see how quick it moves?
Rod Daunoravicius
+8  A: 

I would definitely go with v2.x.

The documentation and tutorials are definitely sparse at the moment (which was pretty surprising given how hyped and popular the framework is) and most of the 1.2 tutorials do not work with v2.x

However I followed this tutorial for Rails 2.0 and managed to get my first Rails app set up successfully. Once you get past that, a lot of the basics are easy to figure out.

There are plenty of communities (or even here) where you can ask specific questions also.

David McLaughlin
+1  A: 

You can get the latest edition of the e-book version of Agile Web Development with Ruby on Rails. It is a beta book, but it is practically finished (I'm reading it myself). Unfortunately it isn't free so if you want to learn from stuff on the net, you'll probably need to downgrade with the earlier RoR version because the RoR 2.0 has a lot of regression gotchas.

Spoike
+1  A: 

I'm in much the same position as you (though I am only a hobbyist), and it's a common problem - a few years ago I had a go at MVC web development in Java, and in between versions of Tomcat, Velocity, Turbine, Struts, etc etc, it was almost impossible to get a working system with documentation: too many moving parts.

RoR reduces the number of moving parts considerably. My solution has been to buy the pdf of Agile Web Devlopment ($12) and go with the latest and greatest, on the assumption that that is where the community dev effort will go - few people will release plugins for 1.2 at this point, I would guess..

Which, in turn, has reminded me how painful pdf readers are. And how much I really need two screens!

HTH

Nick

NickR
The pdf version of Agile Web Development is $24 not 12... and thats quite a bit of money when you convert it to my currency (one of the problems with e-commerce is the lack of differential pricing).
mataal
+1  A: 

Definitely go with Rails 2.x. And by the way, even if you encounter 1.2 tutorials and tips, most of them will work pretty well with Rails 2.

Check out the new Ruby on Rails Guides site. It's very up to date. There is a 'Getting Started with Rails' article.

webmat
+3  A: 

For a new project, definitely go with the latest version of Rails you can comfortably get (i.e. via gems, or your favorite distro's packaging system if you're on a free Unix-like system).

As for books, I highly recommend Obie Fernandez's "The Rails Way", which covers Rails 2.x, and is a very good book that doesn't stick to toy-level examples, but quickly moves up to interesting things. Free tutorials are also available for Rails 2.x, and with every week that passes, more and more Rails 2.x resources are created.

I repeat, there is absolutely no good reason to pick Rails 1.x for a new project. None.

Asaf Bartov
A: 

2.x is the best way to go. I usually prefer to avoid being on edge (having the latest release) because there is not a lot of documentation.

marcgg
A: 

Old thread, but for anyone new looking at it you should probably be using 3.x now.

pushmatrix