views:

477

answers:

3

Is it currently possible with pre release of ironruby to run rubygems? It seems as if I have to set an environment variable to find them?

+1  A: 

if you set ENV['GEM_PATH'] correctly before using rubygems, then gems will work sometimes under IronRuby. I'm actually looking at fixing this right now.

Also, this kind of question is probably better suited for the IronRuby mailing list than it is for StackOverflow.

Curt Hagenlocher
Huh? This question is absolutely appropriate for this site. Are you kidding me? Maybe all Java questions should just be sent to the Java mailing list. Or maybe all SQL questions should just be limited to a SQL mailing list. Better yet. Maybe StackOverflow should just be redesigned to be a list of links to Mailing lists for specialty languages. I think that's "probably" in keeping with the site's original intent. ya think?
Jay Stevens
Well, this was in the context of a language that was rapidly undergoing development at that point (September 2008). Any given answer could have been out-of-date within days of it being made. Now that something has shipped, it is of course a perfectly good question for SO.
Curt Hagenlocher
+2  A: 

You've been able to run rubygems under IronRuby for quite a while now. Simply download and install the latest IronRuby from codeplex, and run igem on the command line


Original Answer:

I'm on that mailing list - to save you the digging, someone asked this a few weeks ago, and this was the answer

The answer (at this point) is no, you can't, but it doesn't seem like it'll be too far away.

PS: listen to curt. He's on the core team for ironruby. <3

Orion Edwards
+1  A: 

with IronRuby 1.0 Alpha 2. You should able to get igem.bat out of the box. According to Jim Deville on Nov 19 2008

Announcing the release of IronRuby 1.0 Alpha 2. You can download it on RubyForge (http://rubyforge.org/frs/?group_id=4359), I will have a tag in SVN soon. Notable features: the inclusion of iirb.bat, igem.bat, irails.bat, irake.bat! This is our first standalone release. Two caveats: If you want caller to work correctly, use -X:Interpret. If you want Rubygems to work, ensure that all of your sources end with a /. You can check in ~/.gemrc

Since then, We're now have official site with daily build. You can find at http://www.ironruby.net/Download

After than, Set GEM_PATH to your \lib\ruby\gems\1.8 directory, e.g. c:\ruby\lib\ruby\gems\1.8

c:\> set GEM_PATH=c:\ruby\lib\ruby\gems\1.8

Test with

c:\> igem.bat
Jirapong