On 2011-04-10, at 15:39, James Nathan wrote:

> does the Free Ride program for Ruby the command program that I need to =
run and write my program?
> James Nathan

James, I'm not sure what your background is, so please accept my =
apologies if this answer doesn't
suit your needs.=20

Ruby programs are run via the `ruby' command, which takes as an argument =
the name of the file containing
your Ruby program. For example, if you put the following contents into a =
file named `prog.rb'

  puts('Hello, world!')
  %w(fee fie foe fum).each do |word|
    puts(word+word)
  end
  puts('And now goodbye')=20

(not an interesting program, but it serves as an example) and run it =
from a terminal window (Command Prompt in Windows), you will get output =
like this.=20

  utopia:tmp vmanis$ ruby prog.rb
  Hello, world!
  feefee
  fiefie
  foefoe
  fumfum
  And now goodbye

I did this on Macintosh OS X (the output is cut&pasted from my Terminal =
window), but you will get similar results on any system.=20

Now how did you get the program into the file `prog.rb'? You use a text =
editor for that purpose. I used Emacs, because I know and love it. =
Others will get equally good results with Vim, TextMate or TextEdit (on =
Macs), or one of many other editors. (I don't really recommend Windows =
NotePad, because (a) it is almost featureless, and (b) it really wants =
to edit text (.txt) files, but no doubt some people can use it happily. =
Don't try to use Microsoft Word or OpenOffice as your text editor, these =
are really not designed for editing programs. Don't post an email saying =
`What is the best editor for Ruby programmers?', unless you want to get =
a LOT of email where people argue that THEIR editor is the best and =
everyone else's is garbage :)

The irb program, provided as a part of the core Ruby package, provides a =
great way of experimenting with programs. It also runs in your =
terminal/Command Prompt window. Suppose you put the following into =
prog2.rb:

  def greet(who)
    puts("Hello, #{who}")
  end

Now you can try it out by calling the procedure interactively, by =
running irb.=20

  utopia:tmp vmanis$ irb=20
  irb(main):001:0> load 'prog2.rb'
  =3D> true
  irb(main):002:0> greet("Gandalf")
  Hello, Gandalf
  =3D> nil
  irb(main):003:0>=20

Not so useful for running a program on its own, but very convenient for =
trying things out and also for debugging.=20

FreeRIDE is intended to be an integrated development environment for =
Ruby, including an editor, debugger, and other tools. I don't know its =
current status, but a look on its web page, freeride.rubyforge,org, =
seems to indicate nothing has happened to it since approximately 2006, =
which suggests it's not something you want to start using. There are a =
number of supported IDEs for Ruby out there, including plugins for =
Eclipse and Visual Studio, as well as commercial products (some of which =
cost money, others might be available at no cost), from companies such =
as JetBrains or ActiveState.=20

All of these IDEs sit on top of the actual Ruby package. Their job is to =
make a programmer's job more productive. Some people really like them, =
others don't. But you don't need them if you want to get started =
programming in Ruby.=20

I hope you found that useful. Please feel free to email me if you have =
additional questions. -- vincent