I am new to Ruby and am not so good with Linux. I am installing Ruby on Red Hat Linux.
I have extracted the Ruby package and am on step 5 of the readme file which says to execute “make”. (NB: I have copy/pasted the steps in the Readme file at the end of this question).
I don’t see a “make” file in the directory I am in (/opt/ruby_home/). I do see a “Makefile” file and tried running it but the output is not right:
[root@sdlc0917 ruby-2.1.3]# ./Makefile
./Makefile: line 1: SHELL: command not found
./Makefile: line 2: NULLCMD: command not found
./Makefile: line 3: NULLCMD: command not found
./Makefile: line 4: V:1=@: command not found
./Makefile: line 4: ECHO1: command not found
./Makefile: line 5: SHELL: command not found
./Makefile: line 5: RUNCMD: command not found
./Makefile: line 6: CDPATH: command not found
./Makefile: line 7: CHDIR: command not found
./Makefile: line 8: exec: =: not found
I issued a find command and found “make” under /usr/bin/ so I ran “make” from there but the output was:
[root@sdlc0917 bin]# ./make make: *** No targets specified and no makefile found. Stop.
So at this point I am not too sure what to do because the readme file doesn’t really explain much.
Thank you very much for the help.
The steps from the Readme file are:
0. If you want to use Microsoft Visual C++ to compile ruby,
read win32/README.win32 instead of this document.
1. If +./configure+ does not exist or is older than configure.in,
run autoconf to (re)generate configure.
2. Run +./configure+, which will generate config.h and Makefile.
Some C compiler flags may be added by default depending on your
environment. Specify <tt>optflags=..</tt> and <tt>warnflags=..</tt> as
necessary to override them.
3. Edit +defines.h+ if you need. Usually this step will not be needed.
4. Remove comment mark(<tt>#</tt>) before the module names from +ext/Setup+
(or add module names if not present), if you want to link modules
statically.
If you don't want to compile non static extension modules
(probably on architectures which does not allow dynamic loading),
remove comment mark from the line "<tt>#option nodynamic</tt>" in
+ext/Setup+.
Usually this step will not be needed.
5. Run +make+.
6. Optionally, run '<tt>make check</tt>' to check whether the compiled Ruby
interpreter works well. If you see the message "<tt>check succeeded</tt>",
your ruby works as it should (hopefully).
7. Run '<tt>make install</tt>'