|
|
Question : Ruby upgrade to 1.8.6 on CentOS
|
|
I have been running Ruby on a CentOS vps for a while with no problems. I have been running 1.8.4, which was installed using Yum. I want to upgrade to 1.8.6, but Yum can't seem to find this version, so I compiled and installed it. I removed the old version from Yum using "yum remove ruby". The new version lives in /usr/local/bin/, but every time I try to access it (say I type "ruby -v"), it says "-bash: /usr/bin/ruby: no such file or directory". /usr/local/bin is in my path, so shouldn't it be able to find it? Any help would be appreciated.
|
Answer : Ruby upgrade to 1.8.6 on CentOS
|
|
That is a problem of the first line in the ruby scripts, It will look like this: #!/usr/bin/ruby
And ruby is not there any longer.
Solution: 1) if you have env and are sure that ruby is in your path write the line #!/usr/bin/env ruby
2) make symbolic link from /usr/local/bin/ruby to /usr/bin/ruby ln -s /usr/local/ruby /usr/bin/ruby
3) change the first line to #!/usr/local/bin/ruby
Regards Friedrich
|
|
|
|
|