Using Ruby properly in Linux with RVM

RVM is a virtual env manager in ruby. This kind of solution is very common currently. In Python and Go we have similar solutions for instance. This is needed because sometimes libraries have different version and conflicts and this makes the process way easier to deal with.

Today as you go down to the isolation and container era you tend to have better separation between development, test and production envs  but even with that is easier to manage dependencies using this kind of systems.

For this blog post i will show how to download, install and configure rvm and install a ruby version on it for Ubuntu Linux.

Installing RVM in Ubuntu Linux

Install RVM

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -sSL https://get.rvm.io | bash
source ~/.rvm/scripts/rvm
type rvm | head -n 1
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile

Install Ruby

rvm install 2.1
rvm use 2.1
ruby -v
rvm use 2.1 --default

Ruby 2.4.4

source ~/.rvm/scripts/rvm
rvm install 2.4.4
rvm use 2.4.4
rvm use 2.4.4 default
gem install bundler
view raw rvm.md hosted with ❤ by GitHub
Have fun.

Cheers,
Diego Pacheco

Popular posts from this blog

Having fun with Zig Language

C Unit Testing with Check

Cool Retro Terminal