where does myfile.rb have to be?
Just save it in the directory you’re in. That could be something like
If you want to know where you are, type in
(It’s a good idea - in the long run - to look at some introductory
Unix/Linux course in a library or in the internet to get all those
common commands and seee how they’re used - don’t be
afraid of options :-)).
Maybe you already have
(check that by typing in
ls /home )
You can create create the directory /home/jon by typing in
Now, your second question:
ruby: no such file to load – ubygems (load error)
Here, you are trying to require rubygems in myfile.rb to load some gem
(gnuplot bindings and many other nice things are distributed
as “gems” in Ruby), and that is not installed, and/or the program that
loads it is not installed.
You need to get it first. See how to install it here:
Some explanations to that manual:
Somewhere, they talk about something you should do as “root”.
You can ignore that in Cygwin.
( It means that on a Linux machine,
there is a system administrator who has more rights than individual
users. Users can only read, write, execute files they have a right to,
and a system administrator can do all of that and change those rights
and cause at lot of harm, also. If you later decide to install Linux
also on your machine, the installation process will ask you to set
a root password and some user password. You’ll then log in as root,
at a console and that password). if you want to do maintenance work
an dangerous things; then you administrate your system :).)
The things written with a blue background a things you need
to type in at the console (you open that by clicking on either of
the two Cygwin icons).
I think you can use all the directory settings as they give them there.
To set a path, just try both the
commands, one of them should work (probably the last one).
If you have come to 3.4 in the manual, you can now install
new gems by typing in
gem install <my_gem>
if you like to use the gem called <my_gem>. This will search for such a
first locally, then in the internet repository .
When that is done, you use that gem, as described in
“The Hard Way” in your script file myfile.rb :
require <my_gem> .
… and now all sorts of awesome ruby commands to make the world
a better place.
PS. Please let me know how it goes.