0

I've downloaded ruby-1.8.7.p334 ruby-1.8.7.p334.tar.gz from ftp.ruby-lang.org, and decompressed it.

When I did ./configure , it complained about no suitable c compiler, so I didyum install gcc.

Then I went back to do

./configure
make
make install

It's all gone OK with no errors, ruby -vgives me -bash: /usr/bin/ruby: No such file or directory.

which ruby returns `/usr/local/bin/ruby'. Below is a listing of /usr/local/bin

[root@ttsdev bin]# ll
total 2684
-rwxr-xr-x 1 root root    3882 Apr  5 13:17 erb
-rwxr-xr-x 1 root root     379 Apr  5 13:17 irb
-rwxr-xr-x 1 root root    1543 Apr  5 13:17 rdoc
-rwxr-xr-x 1 root root    1491 Apr  5 13:17 ri
-rwxr-xr-x 1 root root 2721701 Apr  5 13:17 ruby
-rwxr-xr-x 1 root root     153 Apr  5 13:17 testrb

Any ideas why it's not running?

Kevin Jones
  • 117
  • 1
  • 7

3 Answers3

1

Honestly, use rvm to manage your rubies - it will install, configure everything for you.

tsykoduk
  • 413
  • 2
  • 4
1

There are more things required that just gcc. If you dont want to go the RVM angle you can use the instructions here. It is for 1.9 but could be applied to 1.8.7.

Tom Seibert
  • 189
  • 1
  • 10
1

It's all gone OK with no errors, ruby -vgives me -bash: /usr/bin/ruby: No such file or directory.

which ruby returns `/usr/local/bin/ruby'

Looks like a bad symlink. Not sure why, but looks like ruby -v is trying to read a link to a ruby binary at /usr/bin/ruby, because it's not there it's failing with the error you see.

If /usr/local/bin/ruby is indeed where ruby is installed, quick and dirty fix is to create a symlink to it in /usr/bin:

ln -s /usr/local/bin/ruby /usr/bin/ruby
photoionized
  • 464
  • 2
  • 6