# Trouble to install rsruby on windows XP

**URL:** <https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801>\
**Category:** Ruby\
**Created:** [February 27, 2011, 7:36pm UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801 "2011-02-27T19:36:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [February 27, 2011, 7:36pm UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/1 "2011-02-27T19:36:44Z")

</div>

Hello

I am trying to install rsruby on a windows XP machine

I use the following command

gem install rsruby --with-R-dir=c:/Program Files/R/R-2.11.1/Bin

I got the message:

invalid option : --with-R-dir=c:/Program

is there someon who could help  
thanks a lot

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [February 27, 2011, 9:17pm UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/2 "2011-02-27T21:17:46Z")

</div>

On Feb 27, 3:38pm, “pas d.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> invalid option : --with-R-dir=c:/Program

If you want to provide options to the gem during compile process,  
please place them after double dashes:

gem install rsruby – --with-R-dir=

Also, a few recommendations:

- for --with-R-dir, supply the root directory of R installation, not  
the bin directory
- Try to install R in a path without spaces, path with spaces are  
always problematic. If you can install in a different folder, try  
using Substituted drivers (subst):

subst X: “C:\Program Files\R\R-2.11.1”

gem intstall rsruby – --with-R-dir=X:

- Ensure you have successfully installed a compiler (like DevKit for  
RubyInstaller)

HTH,

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [February 28, 2011, 9:54pm UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/3 "2011-02-28T21:54:18Z")

</div>

Hello Luis

thanks for the help

I did what you suggested:  
gem install rsruby – --with-R-dir=“c:\R\R-2.11.1”

and I get the same error cannot find the R library

concerning DevKit for RubyInstaller, I don’t know,sorry I’am new with  
ruby  
I use Ruby186 and Komodo how can I test if it’s correct? but I installed  
others gems

pascal

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [March 1, 2011, 1:37pm UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/4 "2011-03-01T13:37:31Z")

</div>

Hello Alex

I have two windows machine (xp, vista) and some time but I don’t know  
what knowhow is required to do the check;

I would be please to do it, tell me if you think it’s possible you can  
contact me directly at removed\_email\_address@domain.invalid

pascal

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [March 1, 2011, 10:29am UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/5 "2011-03-01T10:29:19Z")

</div>

On Tue, 1 Mar 2011 05:54:21 +0900, pas d. wrote:

> concerning DevKit for RubyInstaller, I don’t know,sorry I’am new with  
> ruby  
> I use Ruby186 and Komodo how can I test if it’s correct? but I  
> installed  
> others gems
> 
> pascal

Hi Pascal,

As far as I know RSRuby doesn’t install/work on Windows. It should be  
possible to modify the source/build code to make it build, but I don’t  
have a Windows machine (or the time!) to do that work myself -  
apologies. RSRuby does install fine on \*nix based systems or if you are  
tied to Windows I think RPy (the equivalent Python package) does  
install  
on Windows.

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [March 2, 2011, 12:10am UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/6 "2011-03-02T00:10:41Z")

</div>

On Mar 1, 6:28am, Alex G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi Pascal,
> 
> As far as I know RSRuby doesn’t install/work on Windows. It should be  
> possible to modify the source/build code to make it build, but I don’t  
> have a Windows machine (or the time!) to do that work myself -  
> apologies. RSRuby does install fine on \*nix based systems or if you are  
> tied to Windows I think RPy (the equivalent Python package) does install  
> on Windows.

Hello Alex,

Perhaps something like rake-compiler and it’s cross-platform  
compilation infrastructure can help you on that?

> **[GitHub - rake-compiler/rake-compiler: Provide a standard and simplified way to build and...](https://github.com/rake-compiler/rake-compiler)**
>
> Provide a standard and simplified way to build and package Ruby C and Java extensions using Rake as glue.

rake-compiler reduce the code required for extension compilation and  
gem packaging plus additionally you can target Ruby versions of  
Windows without the need of a real Windows machine

(of course, just to compile, for testing and other it will require  
WINE or Windows)

This is been used by projects like DataMapper, SQLite3-Ruby, MySQL  
gem, pg gem and others to deliver pre-compiled binaries and track down  
compilation issues on Windows.

Nowdays Ruby on Windows has migrated to RubyInstaller, which uses GCC  
as compiler toolchain, making things like porting more easy.

As long this extension/gem is not doing sockets, threads or signals,  
things should work smoothly with the above mentioned approach.

If you want, I can provide guidance and support while you introduce  
these changes.

If interested, post to RubyInstaller list:

> **[RubyInstaller - Google Groups](https://groups.google.com/g/rubyinstaller)**

Regards,

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [March 6, 2011, 4:40pm UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/7 "2011-03-06T16:40:38Z")

</div>

Alex G. wrote in post #984890:

> On Wed, 2 Mar 2011 08:10:22 +0900, Luis L. wrote:
> 
> > > are  
> > > [GitHub - rake-compiler/rake-compiler: Provide a standard and simplified way to build and package Ruby C and Java extensions using Rake as glue. · GitHub](http://github.com/luislavena/rake-compiler)  
> > > down
> > 
> > If interested, post to RubyInstaller list:
> > 
> > [http://groups.google.com/group/rubyinstaller](http://groups.google.com/group/rubyinstaller)
> > 
> > ## Regards,
> > 
> > Luis L.
> 
> Thanks Luis - I’ll take a look.

Hello Alex, Luis

I’ve tried to use Rpy on windows but it doesn’t work,  
you need to install three things  
Rpy-1.0.3.win32-py2.7-R.2.12.1  
Numpy-1.5.1-win32-superpack-python2.7  
Pywin32-216.win32-py2.7

and in the end you get  
:  
RuntimeError: No module named \_rpy2111

do you think that it would be possible to use rsruby on windows soon?

Pascal

---

<div class="post-metadata">

**Author:** ![pas\_d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/eb8c5e/32.png) [@pas\_d](https://www.ruby-forum.com/u/pas_d)\
**Post date:** [March 2, 2011, 9:27am UTC](https://www.ruby-forum.com/t/trouble-to-install-rsruby-on-windows-xp/203801/8 "2011-03-02T09:27:28Z")

</div>

On Wed, 2 Mar 2011 08:10:22 +0900, Luis L. wrote:

> > are  
> > [GitHub - rake-compiler/rake-compiler: Provide a standard and simplified way to build and package Ruby C and Java extensions using Rake as glue. · GitHub](http://github.com/luislavena/rake-compiler)  
> > down
> 
> If interested, post to RubyInstaller list:
> 
> [http://groups.google.com/group/rubyinstaller](http://groups.google.com/group/rubyinstaller)
> 
> ## Regards,
> 
> Luis L.

Thanks Luis - I’ll take a look.
