Install rvm
sudo apt-get install software-properties-common
- Add the PPA and install the package
Open a terminal (Ctrl+Alt+T) and run:
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
Solve the problem of rvm command not found on terminal.
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc
and then source ~/.bashrc
and then restart needed.
Open terminal after restart and run rvm -v
Install ruby using rvm rvm install ruby-2.5.1
and we can see all packages installed using rvm list
Needed to run sudo apt install ruby
although i ran rvm install ruby-2.5.1
!!
RubyGems is a Ruby Package Manager, coming with the gem command-line tool. It's automatically installed when we install Ruby on the system. we can check using gem -v
Update gem to the latest version and check it.
gem update --system
See the updated version gem -v
Install rails using gem gem install rails -v 5.2.0
after that we can see list of installed gems using gem list
For sure we can run rails -v