In this section, my VPS using Ubuntu Server OS
1. Connecting to your server
Login using SSH, as the root user
ssh root@100.100.100.100 #VPS IP Address
password: {your_password}
2. Create a new User
Add a new user to instead the root user
adduser your_username
password {enter_the_password_user}
3. Update the ubuntu
Make sure the Ubuntu is up date
sudo apat-get update
4. Install nano text editor
sudo apat-get install nano
5. Install RVM (Ruby Version Manager)
Firstly, we'll install the Curl
sudo apat-get install curl
Then, install the RVM
\curl -L https://get.rvm.io | bash -s stable
After installing is done, load the RVM. You may first need to exit out out your shell session (terminal) and start up a new one
source ~/.rvm/scripts/rvm
6. Install Ruby with RVM
First, RVM will check the dependencies to install ruby
rvm requirements
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
Now we can list all the availabel versions of Ruby that are available:
rvm list known
Will show list all Ruby version like this:
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p374]
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p320]
[ruby-]1.9.3[-p484]
[ruby-]2.0.0-p195
[ruby-]2.0.0[-p353]
[ruby-]2.1.0
[ruby-]2.1.0-head
ruby-head
Select newest Ruby version and install with rvm:
rvm install 2.1.0
rvm --default use 2.1.0
Finally, you need to check installed the Ruby on your computer
ruby -v
gem -v
7. Install Rails
sudo gem install rails
Check rails version
raisl -v