Pen Ttt <myocean135 / yahoo.cn> wrote:

>thinks  everyone.this right way  is :
> 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=/usr/local/ruby
> sudo make
> sudo make install
> sudo ln -s /usr/local/ruby/bin/ruby /usr/bin/ruby
> sudo ln -s /usr/local/ruby/bin/gem /usr/bin/gem
> sudo gedit /etc/environment

No, it's not.  You use sudo only when it is absolutely required, and as
with virtually every package you can download, the ONLY step here that
needs the sudo is the "make install".  You can build it as a normal user.
So:

 wget ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p0.tar.bz2
 tar jxvf ruby-1.9.2-p0.tar.bz2
 cd ruby-1.9.2-p0
 ./configure --prefix=/usr/local/ruby
 make
 sudo make install


> sudo ln -s /usr/local/ruby/bin/ruby /usr/bin/ruby
> sudo ln -s /usr/local/ruby/bin/gem /usr/bin/gem
> sudo gedit /etc/environment
>
>PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin"

If you are adding /usr/local/ruby/bin to your path, then the two symbolic
links are unnecessary.  Further, if you want the links in /usr/bin, why not
just skip the prefix altogether?
-- 
Tim Roberts, timr / probo.com
Providenza & Boekelheide, Inc.