On Sun, Nov 21, 2010 at 7:43 AM, Pen Ttt <myocean135 / yahoo.cn> wrote: > i installed ruby this way: > sudo wget ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2 > sudo tar jxvf ruby-1.9.2-p0.tar.bz2 > cd /home/pt/ruby-1.9.2-p0 > sudo ./configure -prefix=3D/usr/local/ruby > sudo make && make install First off you seem to be using sudo when it normally isn't used and not with it is. Normally do all of the steps up to and including make as a normal user and then do sudo make install and only if you are installing to a place which requires root privileges. Using sudo unnecessarily is dangerous since you really don't know what those commands might do particularly the make > sudo ln -s /usr/local/ruby/bin/ruby /usr/bin/ruby > sudo ln -s /usr/local/ruby/bin/gem /usr/bin/gem This is wrong, you are making /usr/local/ruby/bin/ruby point to the system installed ruby and the same thing for the gem executable. I'm not sure why you did this. If the make install worked it should have made ruby and gem accessible via /usr/loca/bin, probably via symlinks. And since you are setting the PATH environment variable to put /usr/local/bin ahead of /usr/bin the shell should find your installed ruby. I suspect that what happened is that the make install failed because you didn't run it under sudo. That all said, if it were me I'd install ruby using RVM > sudo gedit /etc/environment > > PATH=3D"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr= /games:/usr/local/ruby/bin" > when i restart, > pt@pt:~$ ruby -v > The program 'ruby' is currently not installed. You can install it by > typing: > sudo apt-get install ruby > > could you mind to tell me how to =A0resolve it? > > -- > Posted via http://www.ruby-forum.com/. > > --=20 Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale