# Installing rsruby gem on windows

**URL:** <https://www.ruby-forum.com/t/installing-rsruby-gem-on-windows/158108>\
**Category:** Ruby\
**Created:** [January 19, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/installing-rsruby-gem-on-windows/158108 "2009-01-19T13:47:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [January 19, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/installing-rsruby-gem-on-windows/158108/1 "2009-01-19T13:47:12Z")

</div>

Hi,

I installed R on my Windows machine, and set up an environment variable  
called R\_HOME that points to the folder where the R.exe file is:

C:\Program Files\R\R-2.8.1\bin

But when I just tried to run the gem command from the DOS prompt, I got  
an error:

‘C:/Program’ is not recognized as an external or external command,  
operable program or batch file.

Has anyone ever done this successfully?

---

<div class="post-metadata">

**Author:** ![glenn](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@glenn](https://www.ruby-forum.com/u/glenn)\
**Post date:** [January 20, 2009, 2:22am UTC](https://www.ruby-forum.com/t/installing-rsruby-gem-on-windows/158108/2 "2009-01-20T02:22:32Z")

</div>

Try putting quotation marks around the home like “C:\Program  
Files\R\R-2.8.1\bin”

Glenn wrote:

> Hi,
> 
> I installed R on my Windows machine, and set up an environment variable  
> called R\_HOME that points to the folder where the R.exe file is:
> 
> C:\Program Files\R\R-2.8.1\bin
> 
> But when I just tried to run the gem command from the DOS prompt, I got  
> an error:
> 
> ‘C:/Program’ is not recognized as an external or external command,  
> operable program or batch file.
> 
> Has anyone ever done this successfully?
