1

I have installed ruby1.8 and ruby1.8-dev packages but it doesnt respond to the ruby command at the command line.

ruby
The program 'ruby' is currently not installed.  You can install it by typing:
sudo apt-get install ruby
irb
The program 'irb' is currently not installed.  You can install it by typing:
sudo apt-get install ruby

I am just a little concernted that installing ruby will install a different version.

2

I can only recommend removing the repository rubies and install it via RVM (Ruby Version Manager AFAIK). This will also allow you to have several versions installed, should you ever need that.

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session." >> .bashrc

Then RVM should be installed. Close current terminal and reopen, in order to reload the bash profile. Ruby can now easily be installed by typing

rvm install 1.9.2  #Replace with whatever version you'd like (1.8.7, ree etc.)
rvm --default 1.9.2

This will also install rubygems, and the alias commands for you.

Since none of these commands should be sudo'ed, you will not experience permission problems with gems later on either :-)

Edit: To answer the last question, installing "ruby" from apt will install ruby1.8 too. It's even the same version, but with links fixed. You could just do a

sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby

to fix the links :-)

| improve this answer | |
  • I will do this if I want to install another ruby version. – justintime Sep 5 '11 at 19:56
1
irb

to start the i nteractive r uby b rominisculantiouszorpf (interactive ruby brompt?)

| improve this answer | |
0

Start ruby1.8.

The Ruby version that will installed by the package ruby depends on your Ubuntu version. In 11.04 it's Ruby 1.8. You can find it out using

 apt-cache show ruby| grep ^Depends
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.