This tutorial will guide you to install ruby on Ubuntu machine from source manually.
1. Update your repository
2. Install dependencies for ruby
3. create a folder named ruby
4. Download the latest version of ruby in the folder that was created earlier
5. Uncompress the download ruby source file
6. move to ruby-2.1.3/ folder
7. run configure script. it will check for dependency and create a make file which will contain scripts to compile the code
8. run make command which will build the executable program
9. Now run the make install command which will install the compiled binaries to the /usr/local/bin folder
Ruby is now installed on the system.
10. check if ruby is installed or not. we do this by check the version of ruby.
11. You can now delete ruby folder that we created earlier