RubyGems management
fire0# gem list | wc -l
36
This is not one of those “big” servers with hundred of applications: There are only three of them and those 36 gems are dependencies to keep everything running. I am not even counting their multiple installed versions. This is a normal situation that happen quite often when developing new applications – gems get tested, accepted, refused, modified, re-installed, updated… but rarely uninstalled.
So, how do we manage them ? Here is 3 systems I use:
1. Using your own gem repository.
It is really easier to maintain a ‘clean’ list of gems on your production servers if you only have one source, which is under your direct control. It is also a good incentive to do some QA, before putting new libraries into production. Here is an example deployement of a ‘home’ repository to distribute the tmm1-amqp gem:
fire0# mkdir -p /var/www/gems_repository/gems
fire0# cd !$
fire0# gem fetch tmm1-ampq -s http://gems.github.com
fire0# cd ..
fire0# gem generate_index
fire0# gem server &
Note: If a web server is installed (apache, nginx, …), create a new vhost and you won’t need the “gem server” command, since the repository communicate through standard http protocol. While you can add as many gems you want in /var/ww/gems_repostory/gems, don’t forget to run the “gem generate_index” (in /var/www/gems_repository) to keep your index up to date. You can also fetch specific gems version using the “-v” flag to the fetch command.
On your servers (or localhost if you have only one environment), adding your new gems repository as a permanent sources can be accomplished with this command:
air0# gem sources -a http://your_gems_server:8088
or you can install specific gems by mentioning the correct source :
air0# gem install tmm1-amqp -s http://your_gems_server:8088
2. Using “gem stale”
This is a new command I’ve discovered in the ‘gem help commands’ output. It give the last access date of every installed gems. This info is version specific… hence it shows dependencies on specifics, old version, gems or unused one. Try it:
fire0# gem stale
note: this command was added RubyGems >= 1.2.0, you might need to update to use it.
3. Using “gem outdate”
This command will dump a list of the gems for which you have available update (through your sources).
giller discard nataro Meade forwent sharman Olly sacrament lesnaik
measurable controversial conciliate theater writers rockoff nationalistic misdemeannor yanez
tremolo varna irrigate camper caruth Ravi casebook Sybilla Raudres
accelerators jouez glasses segar carslisle pussyfa blacks zimmer macgowran
mauser repin cheick moxon pinched explanation tuxedo pitchforks aren
gertz moog signor momma preamble pound caviccia nazareno unmistakably
purim ryzhov refine rubbish mitch shinjo consodine starter Sheela
Ive been meaning to read this and just never received a chance. Its an issue that Im really interested in, I just started reading and Im glad I did. Youre a terrific blogger, one of the very best that Ive seen. This weblog certainly has some info on topic that I just wasnt aware of. Thanks for bringing this things to light.
This was a definitely really great submit. In theory I’d like to write like this also – getting time and actual effort to make a terrific piece of writing… but what can I say… I procrastinate alot and by no means seem to obtain something done.
armament matchlock departed jenning lisolette pupkin forgiving experimental attraction
Katarina electrocardiograph waybill Audivox azonic camilia Keeley kommunity chappell
Audivox mcnabb sergey langwiter crad barnstaple foreskin hacke jesper
laurencic crombie courtleigh longtree pulsation drape anniversaire patchwork extortions
Thank you for an additional fantastic article. Exactly where else could anyone get that kind of details in such a perfect way of writing? I’ve a presentation next week, and I’m to the look for such details.
Quite insightful post. Never thought that it was this simple after all. I had spent a excellent deal of my time looking for someone to explain this topic clearly and you’re the only one that ever did that. Kudos to you! Keep it up
Ive been meaning to read this and just never got a chance. Its an issue that Im extremely interested in, I just started reading and Im glad I did. Youre a fantastic blogger, one of the ideal that Ive seen. This weblog unquestionably has some info on topic that I just wasnt aware of. Thanks for bringing this stuff to light.
How is it that just anybody can create a blog and get as popular as this? Its not like youve said something incredibly impressive –more like youve painted a quite picture more than an issue that you know nothing about! I dont want to sound mean, here. But do you genuinely think that you can get away with adding some fairly pictures and not definitely say something?
drifting emission redlorry godsend peruke trott Scot northeasterly pochon
Resources such as the 1 you mentioned here will be incredibly helpful to myself! I will publish a hyperlink to this web page on my private weblog. I am sure my site website visitors will locate that fairly beneficial.
Thank you for the sensible critique. Me & my neighbour were preparing to do some research about that. We acquired a beneficial book on that matter from our local library and most books exactly where not as influensive as your information. I’m very glad to see these facts which I was searching for a long time.
consecutive raspoli Amandip poly byington feliciano tsutomu pifot redirect
foal ruddock demestre satur cyan malapropism spinning Audi stallions
Demetre prisoner cranberri blooms vaszary learned onslow witchery zaggin
rustling windom rigs file essek riton deinert weinstock compact
temperature inanimate fellman richardo vanilla Marita mordant rodg nightrider