dot.Using Making technology about computers, and computers about usability.

Posted
13 August 2007 @ 2pm

Tagged
gems, irb, ruby


Listen to this podcast Listen to this podcast

Install RubyGems from irb

I started using NetBeans recently. And find it’s ruby support superb! (as far as an IDE can go). But there was an error installing gems with their gui manager, and I was wondering how to debug that.

A quick peek into ruby/bin/gem revealed much of what I needed to know.

Lets demonstrate :

Welcome to the JRuby IRB Console 
 
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> Gem.manage_gems
=> true
irb(main):003:0> gem = Gem::GemRunner.new
=> #<Gem::GemRunner:...>
irb(main):004:0> gem.run(['help','commands'])
GEM commands are:
 
    build            Build a gem from a gemspec
    cert             Adjust RubyGems certificate settings
    check            Check installed gems
    ...
=> nil
irb(main):005:0>

update: The bug that prevented me from installing gems, turned out to be a _gemrc file that had http_proxy configured. A proxy no longer in use, but since I didn’t use gems all that much on this workstation before - I forgot all about it.


1 Comment

Posted by
James Branam
21 August 2007 @ 5pm

Hi,
My name is James Branam and I’m the NetBeans Community Docs Manager. Your blog entry would make a fantastic Tips & Tricks entry for our Community Docs wiki (http://wiki.netbeans.org/wiki/view/CommunityDocs). Would you be willing to contribute it? If you need any help or have any questions, please contact me at james.branam@sun.com. I look forward to hearing from you.


Leave a Comment

HAML Caching CGI JRuby in a JAR