-1

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>'
Sagar Sakre
  • 2,336
  • 22
  • 31
Odisseo
  • 747
  • 1
  • 13
  • 32

2 Answers2

0

try this out:

try installing ruby the simpler way through RVM(Ruby Version Manager). Follow this blog post.

Sachin Singh
  • 7,107
  • 6
  • 40
  • 80
0

First of all, study how to execute a makefile

[root@sdlc0917 ruby-2.1.3]# ./Makefile

Its not only a mistake but a crime if you ever try to run Makefile like that. Makefiles are not shell scripts where you can execute using ./. Just give make in project folder. make from /usr/bin/make will automatically pickup the Makefile file in your current folder, parse it and run the rules specified in the `Makefile.

found “make” under /usr/bin/

Yes make is a GNU utility which will be installed under /usr/bin.

[root@sdlc0917 bin]# ./make make: *** No targets specified and no makefile found. Stop.

Seems like you cd to /usr/bin and executed make but there are no makefile under /usr/bin so error is quit obvious.

Community
  • 1
  • 1
Sagar Sakre
  • 2,336
  • 22
  • 31