Forum: Ruby Re: ruby/gnuplot on windows

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
67bb4df2775f6a6b603347dce7119571?d=identicon&s=25 unknown (Guest)
on 2006-05-17 23:31
(Received via mailing list)
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
B35e9113d2d517beb19ebd9eeb4d77be?d=identicon&s=25 jon dean (Guest)
on 2006-05-18 00:21
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
B35e9113d2d517beb19ebd9eeb4d77be?d=identicon&s=25 Jon Dean (Guest)
on 2006-05-18 06:26
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
This topic is locked and can not be replied to.