简体   繁体   中英

what do these rvm ruby versions mean

If I run this command

rvm list known

I get the following (just showing a few entries) -

[ruby-]1.9.3[-p194]
[ruby-]1.9.3-head
ruby-head

I want to install ruby 1.9.3. In the blog entries online I have seen people just mentioning

rvm install 1.9.3

which actually installs -p194 version.

So how does ruby-head differ from 1.9.3-head from 1.9.3-p194 ? And should one of them be installed instead of -p194?

In version control, you often have a main development branch as well as certain versioned branches. The main branch is the future, the versioned branches have some policy around them.

So, for example, ruby-head is a wild playground of new features, while ruby-1.9.1 or ruby-1.9.2 or ruby-1.9.3 have certain feature or syntax lockdowns in place on them.

Within a feature branch there are further ongoing bug- and security-fixes. Ruby 1.9.3-p194 is more recent than Ruby 1.9.3-p125. There were no public releases for the 68 checkins between these two versions, for whatever reason. Maybe a change introduced more bugs. Maybe a change didn't fully solve what it was trying to fix. Ruby 1.9.3-head is the head of this development branch, with the absolute latest changes (and the risks that may accompany them).

In general, you want to pick a specific release. This is what RVM is doing for you when you asked for "some version of 1.9.3" and it said "I'll give you the latest approved release in that branch". These blessed releases have been vetted and approved by the software maintainers. Picking a -head branch is surfing on the very forefront of development. It may be helpful—maybe someone just checked in a fix yesterday to exactly some problem you're having; maybe the interpreter is 2% faster or more memory efficient—but it is more likely to bring you trouble.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM