Skip to content

Running Ruby Home on a Raspberry Pi

Karl Entwistle edited this page May 19, 2020 · 9 revisions

Running Ruby Home on a Raspberry Pi is straightforward. These instructions have been tested on a Raspberry Pi B+ with Raspbian.

Update apt-get

sudo apt-get update

Install dependencies

sudo apt-get install bison build-essential git \
libavahi-compat-libdnssd-dev libreadline6 \
libreadline6-dev libssl-dev libyaml-dev zlib1g zlib1g-dev

Install libsodium

I couldn't get libsodium working when running sudo apt-get install libsodium-dev as recommended in the README. Instead I built it from source

wget https://download.libsodium.org/libsodium/releases/LATEST.tar.gz
tar -zxvf LATEST.tar.gz
cd libsodium-stable
./configure
make && make check
sudo make install

Install rbenv

git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build

Install latest ruby version ruby

rbenv install $(rbenv install -l | grep -v - | tail -1)
rbenv global $(rbenv install -l | grep -v - | tail -1)
rbenv rehash

Install Ruby Home

gem install ruby_home