How to setup ruby development setup in Ubuntu 20.04
setup git and github
You can create an account https://github.com/ with your email
And then setup git with the same account that we used with github.
Please replace DEVELOPER_NAME with your name and DEVELOPER_EMAIL with your email address
in below commands
# install git module
sudo apt-get update
sudo apt-get install git-core
# Configure git
DEVELOPER_NAME="rakesh"
DEVELOPER_EMAIL="rakesh@tenderprog.com"
git config --global color.ui true
git config --global user.name $DEVELOPER_NAME
git config --global user.email $DEVELOPER_EMAIL
# generate ssh key
ssh-keygen -t rsa -b 4096 -C $DEVELOPER_EMAIL
Next we need to add SSH key to your github account “settings” -> “SSH and GPG keys” here https://github.com/settings/ssh
and add “New SSH key”
Once you are done with above mentioned steps
run below command to verify the setup
ssh -T git@github.com
# you should see a message similar to below, that indicate setup is completed
Hi YourGithubAccountName! You've successfully authenticated, but GitHub does not provide shell access.
setup rvm
First install GPG keys
gpg --keyserver hkp://pool.sks-keyservers.net \
--recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 \
7D2BAF1CF37B13E2069D6956105BD0E739499BDB
# install curl if curl command fails, Command 'curl' not found
sudo apt install curl
# install rvm
\curl -sSL https://get.rvm.io | bash
# if the above commands doesn't wotk please go here https://rvm.io/rvm/install
# load rvm in current open shell window
source ${HOME}/.rvm/scripts/rvm
# check rvm vesion
rvm -v
Install ruby
we will be using the latest ruby available for the development that is 2.7.2
but you could install the ruby version as per your like
rvm list known
will return all available ruby versions for your system
# list all available ruby versions for the current system
rvm list known
rvm install ruby-2.7.2