Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a Unix platform on VNC viewer. Now I want to upgrade to Ruby version 1.9.2.

I don't have root permissions. So is there any way by which I could install Ruby 1.9.2?

share|improve this question
up vote 2 down vote accepted

Step 1: Install RVM

You can always install Ruby over rvm, which can be run as a single user.

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)

or, if you don't have git:

curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer ; chmod +x rvm-installer ; ./rvm-installer --version latest

Then run the following to put rvm into your .bash_profile:

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile

Reload the shell config:

source ~/.bash_profile

Step 2: Install Ruby 1.9.2

Finally, install Ruby 1.9.2:

rvm install 1.9.2

You can setup rvm to use it as default:

rvm --default use 1.9.2
share|improve this answer
    
hey thank u for your reply.. But this gives me an error stating: chmod: getting attributes of `rvm-installer': No such file or directory ./rvm-installer: Command not found If i execute the first bash cmd it says: Missing name for redirect – Sundar May 13 '11 at 10:19
    
@Sundar Try to break it up: Does the following work? curl -s https://rvm.beginrescueend.com/install/rvm -o rvm-installer – slhck May 13 '11 at 10:24
    
yes this works but next when i execeute "chmod +x rvm-installer" it gives out that error – Sundar May 13 '11 at 10:26
    
hey i've one more problem.. if i execute the curl cmd without -s (used for don output anything) it says: curl: (6) Couldn't resolve host 'rvm.beginrescueend.com' – Sundar May 13 '11 at 10:39
    
So can you ping the host then? – slhck May 13 '11 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .