Should I learn Ruby 1.8 or 1.9?

I recently started learning Ruby, and I was interested to know which version you will learn. I have a Matz Ruby book , so I have some idea of ​​the differences, and by default I would choose 1.9 because of performance when working with characters, and simply because there is little to learn that will become obsolete soon!

However, I had some problems with 1.9.1 when things did not work properly due to the gems not being updated for version 1.9. I also wanted to use rcov to cover the encoder, which seems to be the only tool, but it does not work for 1.9. And I also just read this blog post about someone switching from Ruby for the same reason.

A similar question was asked here , but that was a few months ago, and everything could change. I'm not doing anything specific with Ruby right now, but I plan to write a web application soon, possibly using Rails, if that matters.

thanks

+4
source share
2 answers

The difference between the two versions of the language is not related to novelty. You should probably use 1.8, since it works with most gems that you will use, and you will not encounter errors that are not your mistake, stumbling over the learning process. When the time comes, you can easily switch to 1.9.

+8
source

I agree with clyfe regarding the use of the library. It is also more clear why changes in 1.9 exist after understanding 1.8.

I would also suggest using 1.8 with Rails, as it has been proven to be more stable and compatible. (As a side note, I also stuck with Rails 2.x.)

+1
source

Source: https://habr.com/ru/post/1316413/


All Articles