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=/usr/local/ruby
sudo make && 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"
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
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 resolve it?
First you have to check whether the compilation & installation process
did succeeded.
Second the target prefix for configure script has two hyphens before so
it has to look like:
sudo ./configure --prefix=/usr/local/ruby
Third what is an output of <code>ls -l /usr/local/ruby/bin/ruby</code> ?
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=/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
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
···
On Sun, Nov 21, 2010 at 7:43 AM, Pen Ttt <myocean135@yahoo.cn> wrote:
sudo gedit /etc/environment
PATH="/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
when i installed ruby,
pt@pt:~$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
pt@pt:~$ irb
The program 'irb' can be found in the following packages:
* ruby
* irb
Try: sudo apt-get install <selected package>
what's wrong?
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
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?
···
Pen Ttt <myocean135@yahoo.cn> wrote:
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
typing "irb" & pressing TAB doesn't get you anywhere?
···
On Mon, 2010-11-29 at 21:04 +0900, Pen Ttt wrote:
when i installed ruby,
pt@pt:~$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
pt@pt:~$ irb
The program 'irb' can be found in the following packages:
* ruby
* irb
Try: sudo apt-get install <selected package>
what's wrong?
when i installed ruby,
pt@pt:~$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
pt@pt:~$ irb
The program 'irb' can be found in the following packages:
* ruby
* irb
Try: sudo apt-get install <selected package>
what's wrong?
you only created a link for ruby & gem.
you need to create a link for irb too.
best regards -botp
···
On Mon, Nov 29, 2010 at 8:04 PM, Pen Ttt <myocean135@yahoo.cn> wrote:
when i installed ruby,
pt@pt:~$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux]
pt@pt:~$ irb
The program 'irb' can be found in the following packages:
* ruby
* irb
Try: sudo apt-get install <selected package>
what's wrong?
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
sudo ./configure --prefix=/usr/local/ruby
sudo make
sudo make install