Are there installation instructions for Mac OS X somewhere?
Log so far:
- Downloaded source files, unzipped, removed the black stuff.
- Read the README. Accordingly:
- Checked that configure was a recent copy.
- typed ./configure
- typed make
- typed make test (successful)
- typed sudo make install
(didn't know at this stage that mac already comes with ruby installed.
The last step probably replaced the preinstalled version if any.
I don't really mind as the impression I get of Ruby is that it's a fast
developing language and so it's worth having the most up to date copy.)
Now the exciting bit: typed ruby.
Basically nothing happens. I can type commands but there is no prompt and the commands never return anything:
.../Languages/Ruby/ruby-1.8.3 max$ ruby
1
1*2
print "ElloElloEllo"
[pressed control C to escape]
Is there any more information I need to provide when compiling?
On the ruby wiki the installation instructions mention how to inform the compiler of the location of X11, Tk, Tcl and a few other packages like that, however make test succeeded so I doubt this. What are all the dependencies? Why, for instance, might X11 be needed for a command line program?
Does any of you use Mac OS X? How do you compile? Did you have to install any other packages first?
You use the ruby command to run scripts that you type into a file. Try to do thye same thing you did by typing ruby at the cli prompt and then after typing a few expressions, hit Cntrl-D. That will cause the code to execute. But You are better off using interactive ruby to play with ruby on the command line. Type irb at your command line and you will see what happens.
By default, Ruby installs to /usr/local/bin/ruby, while the original one is at /usr/bin/ruby - so unless you changed it, the original's still there. You can set your path variable to determine which one to use. Mac's default Ruby is subtley broken, so you're likely better off in the long run installing your own.
If you just type Ruby, then the interpreter is reading from the standard input as if it were a file (this is pretty standard behaviour, perl works the same way). If you hit ctrl-D (which indicates end-of-file) you should see something happen. If nothing happens when you do that, then something is very definitely UP.
Something better to try would be running 'irb' which is the interactive interpreter, which sounds like what you were expecting to get in the first place.
good luck,
matthew smillie.
···
On Dec 1, 2005, at 22:36, m@de-minimis.co.uk wrote:
Are there installation instructions for Mac OS X somewhere?
Log so far:
[looks good]
Now the exciting bit: typed ruby.
Basically nothing happens. I can type commands but there is no prompt and the commands never return anything:
.../Languages/Ruby/ruby-1.8.3 max$ ruby
1
1*2
print "ElloElloEllo"
[pressed control C to escape]