Bash – -bash: /usr/bin/ruby: No such file or directory

bashrubyrubygems

I have installed ruby 1.9.2 on my centos server as per this tutorial – http://blog.jeffcosta.com/2010/09/10/7-steps-to-rails-on-centos/

It says that it should be installed to the following locations:
/usr/local/include/ruby
/usr/local/bin/ruby
/usr/local/lib/ruby
/usr/local/share/doc/ruby/html
/usr/local/share/man1

However the only locations where there are things present are the 2nd and 3rd, the 2nd is the ruby installation (and is 1.9.2) the 3rd is a folder.

I have checked $PATH and /usr/local/bin is there

/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

so I don't understand why I get this error '/usr/bin/ruby: No such file or directory' when I try to run 'ruby'

A bit of background, I uninstalled the yum version so I could install a newer version than 1.8.5 and therefore install gem and passenger.

Thanks
James

Best Answer

I've seen on some linux distros if you don't use the virtual/recommended ruby package the actual filename that gets installed is ruby19x. You can create a symlink to ruby which will clear it up.

Related Topic