Gentoo Archives: gentoo-web-user

From: Adam Sroka <asroka@×××××.net>
To: gentoo-web-user@l.g.o
Subject: Re: [gentoo-web-user] Java Script Libraries
Date: Thu, 23 Feb 2006 17:22:19
In Reply to: RE: [gentoo-web-user] Java Script Libraries by Stuart Herbert
Stuart Herbert wrote:
> Hrm ... all the code I've seen uses: > > require_gem "<package-name>" > > with no sign of version requirements passed around. How does Gems > handle the versioning in the background? > > Best regards, > Stu >
That code is implicitly saying "use the latest version of <package-name>". However, Gems also lets you say: require_gem '<package-name>', '>= 1.1.5' One of the most useful things you can do is say: '~> 1.1' This means, use the version closest to 1.1, but I don't care which minor revision you use. This will allow you to pick up new minor revisions that contain, for instance, a security patch, but not major revisions that might change the API. For more info see here: Another thing that is great about Gems is that you can stand up a gem server and serve your own versions of any required libraries. All a user would have to do is point at your gem server, and they could use your version. This is analogous to having your own rsync server. -- gentoo-web-user@g.o mailing list