Installing rbenv and ruby on Raspberry Pi

Update 2020-06-17: For raspbian lite do the following steps prior to install rbenv/Ruby

sudo apt-get install -y libssl-dev libreadline-dev

Install Ruby using rbenv in 4 simple steps:

Open a terminal window in raspbian and follow these instructions:

Step 1: Install rbenv from github repo:

git clone $HOME/.rbenv

Step 2: Install ruby-build from github repo:

mkdir $HOME/.rbenv/plugins
git clone $HOME/.rbenv/plugins/ruby-build

Step3: Update with .bashrc;

export PATH=$HOME/.rbenv/bin:$PATH
eval "$(rbenv init -)"

Step4: Install Ruby

rbenv install 2.7.0 --verbose

and voila you now have Ruby running in your raspberry pi!



comments powered by Disqus