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?

3 Answers 3

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.

1

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

2
  • and gemcutter for your gems! Apr 5, 2011 at 20:28
  • Yup. If you're not using RVM, your doing it wrong. ;-)
    – tsykoduk
    Apr 6, 2011 at 1:30
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
1
  • +1 for actally trying to answer the question I asked Apr 6, 2011 at 10:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .