Ruby installation
Create directory for ruby and rubygems sources under your home /home/username/env
. Download ruby there from official site. Extract it in the same folder and move into it:
Now run configure script with option which tells where to install it (to avoid permissions issues): -prefix=$Home/env
then make and install:
Almost done, the only thing left is to add /bin
folder to the PATH. Do it in .profile or in .bash_profile or some other startup script:
Please note that the bin folder should be before original PATH variable, just in case you have set another version of ruby in it.
To check the installation run ruby -v
.
Rubygems installation
Download rubygems into the env
folder from here and extract it.
Create gems folder under env (mkdir gems
) and set GEM_HOME variable to point it in this folder:
Now go to extracted ruby folder and run setup script:
To check the installation run gem env
.