On Nov 21, 2010, at 17:42 , Pen Ttt 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=3D/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
>=20
> =
PATH=3D"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/=
games:/usr/local/ruby/bin"

Again, don't blindly use sudo!

This should work just as well, and safer too:

cd
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=3D/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

and since you're making symbolic links to a directory that is already in =
your PATH, you don't need to edit your PATH in /etc/environment.