I have 开发者_如何学Pythonvanilla Mac OS X Leopard which comes with 1.8.6.
I am new to RoR so will be following tutorials on the net. Am I likely to find problems following them when using later versions of Ruby?
I am currently looking at this one which mentions 1.8.6 and 1.8.7 - http://www.railstutorial.org/book
RoR tutorials will be fine on both, but if you're learning Ruby you should learn 1.9. 1.8.6 won't be supported in Rails 3, so I'd say go 1.8.7 or 1.9. I also recommend RVM for switching between Ruby versions.
The 1.8.x series (mostly 1.8.6) is still very much in widespread use and likely to remain that way for at least a year or so; 1.9 is slowly being transitioned to. Although there are some major differences between the two, for the most part everything you can do in 1.8 you can also do in 1.9.
Many of the trickier bits, like blocks and lambdas, get a bit of a makeover, but otherwise tutorials for 1.8 will still apply to 1.9 for the most part. You're likely to run into issues if you use gems and libraries from 1.8 in 1.9, however.
I believe Rails 2.3.5 is fully compatible with Ruby 1.9. The problem is not usually of Rails itself, but from other gems and plugins that might be outdated. However again try it, most likely you won't face problems.
Anyway, I highly recommend Ruby Version Manager(RVM) for trying several versions of Ruby.
I'll second the 1.9 recommendation. I'm kicking myself for not settling on 1.9 a year ago.
It's much more future-proof at this point. Targetting 1.8 is about like targeting Windows Vista at this point.
精彩评论