# Installing gems into IronRuby

**URL:** <https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441>\
**Category:** IronRuby\
**Created:** [March 1, 2012, 4:26pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441 "2012-03-01T16:26:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [March 1, 2012, 4:26pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/1 "2012-03-01T16:26:03Z")

</div>

Hi,

First post here. Excuse a n00b for silly questions. 🙂 I’ve been trying  
to figure this out for a short time and while I have an idea, I’d like  
some confirmation.

I need to install a gem so I can automate some WPF code. One I’m  
planning to use is called bewildr. How do I install gems into Ironruby  
in Visual Studio 2010? Is there a specific way to do it? Or is  
installing gems into a general ruby (non-ironruby) install sufficient?

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 1, 2012, 8:16pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/2 "2012-03-01T20:16:48Z")

</div>

Just open cmd and run ‘igem install bewildr’. If IronRuby binaries  
folder  
is not in the PATH environment variable, browse to it first (this is  
where  
the igem utility is located).

Shay.

* * *

Shay F. | CodeValue [http://codevalue.net/](http://codevalue.net/) Co-Founder, Dynamic  
Languages and Web Technologies Expert | Microsoft Visual C#/IronRuby  
MVP |  
Author of IronRuby Unleashed  
Email: removed\_email\_address@domain.invalid | Blog:  
[http://IronShay.com](http://IronShay.com)[http://ironshay.com/](http://ironshay.com/) |  
Twitter: [http://twitter.com/ironshay](http://twitter.com/ironshay)

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 1, 2012, 10:57pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/3 "2012-03-01T22:57:33Z")

</div>

I think this was a bug in version 1.1. Download the latest bits  
(1.1.3[http://ironruby.com/download/](http://ironruby.com/download/))  
and this should work.

Shay.

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 1, 2012, 9:11pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/4 "2012-03-01T21:11:07Z")

</div>

Thanks, that helps. I tried that and igem was in path. However, here is  
what I got:

C:\Program Files (x86)\IronRuby 1.1\bin\>igem install bewildr  
ERROR: While executing gem … (ArgumentError)  
Illegal characters in path.

Same thing happens when I try to do update:

C:\Program Files (x86)\IronRuby 1.1\bin\>igem update --system  
Updating RubyGems  
Updating rubygems-update  
ERROR: While executing gem … (ArgumentError)  
Illegal characters in path.

Any ideas what the problem is? What path is it referring to?

I looked at HOME and it appears to be in order:  
C:\Program Files (x86)\IronRuby 1.1\bin\>SET HOME  
HOMEDRIVE=C:  
HOMEPATH=\

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 1, 2012, 11:14pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/5 "2012-03-01T23:14:06Z")

</div>

I do have the latest (1.1.3). It’s still happening. I think there is an  
issue with the path somewhere. Is there any sort of log for this? It’s  
rather difficult to figure out where it stumbles without it.

Here is the c/p:  
C:\Ironruby\bin\>igem update --system --no-ri --no-rdoc  
Updating RubyGems  
Updating rubygems-update  
ERROR: While executing gem … (ArgumentError)  
Illegal characters in path.

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 1, 2012, 11:55pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/6 "2012-03-01T23:55:36Z")

</div>

Nevermind, I got it!

Installed it through NuGet package manager in Visual Studio instead.  
Both commands worked just fine!

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 2, 2012, 7:24pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/7 "2012-03-02T19:24:09Z")

</div>

Eugene,

I’ve found that it is necessary also to run either cmd or powershell  
as administrator in order to install gems.

Regards,

Eduardo

Eugene A. wrote in post #1049720:

> I do have the latest (1.1.3). It’s still happening. I think there is an  
> issue with the path somewhere. Is there any sort of log for this? It’s  
> rather difficult to figure out where it stumbles without it.
> 
> Here is the c/p:  
> C:\Ironruby\bin\>igem update --system --no-ri --no-rdoc  
> Updating RubyGems  
> Updating rubygems-update  
> ERROR: While executing gem … (ArgumentError)  
> Illegal characters in path.

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [March 1, 2012, 11:06pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/8 "2012-03-01T23:06:49Z")

</div>

Eugene:

I assume that you installed the latest version (1.1.3)

It would be good to do this first:

igem update --system --no-ri --no-rdoc

(usually you get errors when trying to instar ri and rdoc documentation)

then install using:

igem install bewildr --no-ri --no-rdoc  
(same thing)

Hope this works,

Eduardo

---

<div class="post-metadata">

**Author:** ![synchromesh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8edcca/32.png) [@synchromesh](https://www.ruby-forum.com/u/synchromesh)\
**Post date:** [April 8, 2012, 5:38pm UTC](https://www.ruby-forum.com/t/installing-gems-into-ironruby/217441/9 "2012-04-08T17:38:34Z")

</div>

Yes - admin mode for cmd is essential for any of this scripting stuff. I  
used to run into all sorts of errors, even with normal Ruby updates. I  
now have a cmd shortcut on the desktop that asks for admin and has a  
couple of other tweak (consolas font, wider window etc)
