Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

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.

share|improve this answer

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

share|improve this answer
    
and gemcutter for your gems! –  Tom Seibert Apr 5 '11 at 20:28
    
Yup. If you're not using RVM, your doing it wrong. ;-) –  tsykoduk Apr 6 '11 at 1:30

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
share|improve this answer
    
+1 for actally trying to answer the question I asked –  Kevin Jones Apr 6 '11 at 10:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.