# Re: ruby/gnuplot on windows

**URL:** <https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/60850>\
**Category:** Ruby\
**Created:** [May 17, 2006, 11:31pm UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/60850 "2006-05-17T23:31:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 17, 2006, 11:31pm UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/60850/1 "2006-05-17T23:31:16Z")

</div>

Dear Jon,

> I have always used windows and am not very familiar with Unix. How much  
> of a learning curve would there be to use cygwin?

Well, to obtain a working gnuplot installation of Gnuplot and Cygwin,  
it should be sufficient that you download the setup.exe file from the  
website, which guides you through some Windows-typical setup  
process. If you have enough space on your computer, choose  
everything there is , if you have a limited amount of space,  
be sure to choose the developer tools, including the compiler ‘gcc’  
and ‘make’, as well as Gnuplot and of course, Ruby.  
Then run the GUI installation. This will give you two icons on your  
desktop, named “Cygwin” and “Cygwin XFree86”. Click any of these.  
This opens a console window.  
Now, you can run ruby scripts by entering something like

ruby myfile.rb

there. Or, you can use Gnuplot:

gnuplot myplot.plt

That should be all for a start.

The nice thing about Cygwin is that it brings to you the ability  
to run many free open-source softwares on Windows - so you don’t have  
to pay or wait until company x produces a software y that solves your  
problem  
z which is a bit too esoteric to make enormous amounts of money  
out of it. If you compare the quality of advice you get from a  
commercial  
company with few counsellors and a hotline you have to pay for and  
a on open community, you’ll often find far better advice from the  
latter  
one.  
Unix/Linux’s and Cygwin’s charms lie in the fact that you can control  
everything from the command line, so, in the long run, learning to deal  
with it is time well spent. Here, there are no differences between  
Cygwin and Linux (or almost).  
And there are plenty of problems like yours when using Windows -  
somehow, your software doesn’t do what you want it to do, the manuals  
are inexistant or unconclusive, and you’re stuck.  
In my experience, in Linux/Unix/Cygwin, documentation was in general  
far  
better, and there is information available in the internet or from  
people  
that feel ethically bound to answer your questions just like others  
helped them earlier.

A second step you can take, if you are a little bolder, is to install  
software from source. This may be necessary in some cases where  
there are no gems for Ruby packages you want to use.  
You can install these by downloading a packed file that usually  
ends its name in ‘gz’.  
Assume that its name is ‘awesome\_prog-1.2.3.tar.gz’.

Then, download that file to your computer and copy it (using Windows,  
for a  
start)

into some directory, say

C:\cygwin\usr\local (that directory is already there).

Now, in the console window, type

```
cd /usr/local <RETURN>

```

to get to that directory,  
then type

```
gunzip awesome_prog-1.2.3.tar.gz <RETURN>

```

to unzip the file,

```
tar -xvf awesome_prog-1.2.3.tar <RETURN>

```

to extract it into a subdirectory tree named something like  
/usr/local/awesome\_prog-1.2.3,

cd awesome\_prog-1.2.3

to go there, and then

./configure

(notice the dot), this gives a lot of messages where the software tries  
to  
figure  
out specific properties of your computer, and after that is finished,

```
make

```

and after that is finished,

```
make install

```

This may take some time, but in general, it runs smoothly and gives you  
access  
to much software. Sometimes, this install process is a little different,  
you  
may  
need to specify some options. Look at the README file in the

/usr/local/aresome\_prog-1.2.3

directory to get information about it.

This will sound overwhelming to you now, but if you’ve done it two  
times,  
it’s  
easy, and may be the only way to make you go. If anything goes wrong,  
don’t hesitate to ask a mailing list. There are many people that do  
these  
things on a daily basis, and they will often have done it wuith  
precisely  
the software that you are now using.  
That is no so often the case with Windows applications, in my  
experience,  
at least – it’s just easier to ask several hundred people for something  
and  
find somebody who knows an answer than to consult a professional  
troubleshooter who is amazed at what strange things you do with their  
software.

Just take the first step now, I think it will not only solve the  
problem you  
have today,  
but also the one from next month and next year.

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 18, 2006, 12:21am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/60850/2 "2006-05-18T00:21:14Z")

</div>

unknown wrote:

> Dear Jon,
> 
> > I have always used windows and am not very familiar with Unix. How much  
> > of a learning curve would there be to use cygwin?
> 
> Well, to obtain a working gnuplot installation of Gnuplot and Cygwin,  
> it should be sufficient that you download the setup.exe file from the  
> website, which guides you through some Windows-typical setup  
> process. If you have enough space on your computer, choose  
> everything there is , if you have a limited amount of space,  
> be sure to choose the developer tools, including the compiler ‘gcc’  
> and ‘make’, as well as Gnuplot and of course, Ruby.  
> Then run the GUI installation. This will give you two icons on your  
> desktop, named “Cygwin” and “Cygwin XFree86”. Click any of these.  
> This opens a console window.  
> Now, you can run ruby scripts by entering something like
> 
> ruby myfile.rb
> 
> there. Or, you can use Gnuplot:
> 
> gnuplot myplot.plt
> 
> That should be all for a start.
> 
> > 
> 
> Just take the first step now, I think it will not only solve the  
> problem you  
> have today,  
> but also the one from next month and next year.
> 
> Best regards,
> 
> Axel

Hi Axel,

That’s awsome! Thank you so much for taking the time to spit that out  
for me. I’ve always toyed with the idea of trying to move out of  
windows but the comfort of already knowing it has prevented it in the  
past. I’ll try cygwin out with ruby and gnuplot and let you know how it  
goes.

Jon

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 18, 2006, 6:26am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/60850/3 "2006-05-18T06:26:11Z")

</div>

jon dean wrote:

> unknown wrote:
> 
> > Dear Jon,
> > 
> > > I have always used windows and am not very familiar with Unix. How much  
> > > of a learning curve would there be to use cygwin?
> > 
> > Well, to obtain a working gnuplot installation of Gnuplot and Cygwin,  
> > it should be sufficient that you download the setup.exe file from the  
> > website, which guides you through some Windows-typical setup  
> > process. If you have enough space on your computer, choose  
> > everything there is , if you have a limited amount of space,  
> > be sure to choose the developer tools, including the compiler ‘gcc’  
> > and ‘make’, as well as Gnuplot and of course, Ruby.  
> > Then run the GUI installation. This will give you two icons on your  
> > desktop, named “Cygwin” and “Cygwin XFree86”. Click any of these.  
> > This opens a console window.  
> > Now, you can run ruby scripts by entering something like
> > 
> > ruby myfile.rb
> > 
> > there. Or, you can use Gnuplot:
> > 
> > gnuplot myplot.plt
> > 
> > That should be all for a start.
> > 
> > >

Hi Axel,

I installed cygwin and included the ‘gcc’, ‘make’, ‘gnuplot’ and ‘ruby’.  
I opened the console window and am stuck at that point. If I want to  
run a ruby program:

ruby myfile.rb

where does myfile.rb have to be? In windows I would set the path to the  
directory that the file is located. So I put the myfile.rb file into  
one of the directories in c:\cygwin, changed the directory path to match  
and got:

ruby myfile.rb  
ruby: no such file to load – ubygems (load error)

Any suggestions to get me started. I think if I had an example I would  
be able to work from there.

Jon
