First
- This is almost the same way to install in Debian.
- Please be patient because it may take several hours to install Razpai because the spec is low.
Prerequisites
- Body: Raspberry Pi 1 Model B+
- Memory card: 8GB
- OS: Latest version of Raspbian installed
rbenv installation
Install rbenv and write the configuration to the bash configuration file, if you use zsh, etc.
> sudo apt-get install rbenv
> echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bashrc
> echo 'eval "$(rbenv init -)"' >> .bashrc
Confirmation of installation
> rbenv
> rbenv x.x.x #version to be displayed
Installing ### git
If git is not installed, install git.
> sudo apt-get install git
Install ruby-build
I'm going to clone ruby-build from git.
> git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
> rbenv install --list
there are 2.3.1 and the latest version of Cruby 2.3
rbenv install 2.3.1
Troubleshooting
If you don't have enough libraries in your Ruby installation, you can try to add them by using the following command
> sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
Reference: https://github.com/rbenv/ruby-build/wiki#suggested-build-environment
If you installed ruby-build with apt-get
Even if I install ruby-build by apt-get, there is no latest version of Ruby in the list of available installables.
At runtime, ruby-2.2.0-preview is the latest version, and there is no 2.3 system of the latest version at this time.
> sudo apt-get install ruby-build
> rbenv install --list
To uninstall ruby-build, click here
> sudo apt-get remove ruby-build
Top comments (2)
Hi kon_yu,
I strictly followed your instructions and now there seems to bee a working ruby installation in /versions/3.2.0 but the system still runs the old ruby version 2.3.3.
Any idea what I can try?
BTW: I am not really a Linux expert.
Thanks in advance!
Rick
Thank you for your comment.
Did you set global version setting? Like below
rbenv global 3.2.0
Another tips
rbenv rehash
Or
reload shell
exec $SHELL -l