#
Installing Ruby
The installation instructions provided below aim to be the fastest and simplest way to install Ruby, with the ability to install gems that build native extensions.
The general instructions are:
- Install build tools / development tools
Each operating system's package manager has its own "meta package" that installs some compilers and other packages needed for building other packages. - Install libyaml
Many Ruby gems rely on this library. - Ensure the gem bin path is in your
$PATH
Some installation methods do not update the$PATH
properly. You will need to alter your$PATH
so that it includes the path to the location of gem executable files.
#
brew
- macOS
$ brew install ruby
$ gem install bashly
#
apt
- Ubuntu / Debian
$ sudo apt -y update
$ sudo apt -y install build-essential libyaml-dev ruby-dev
$ sudo gem install bashly
#
pacman
- Arch Linux
$ sudo pacman -Suy
$ sudo pacman -S base-devel ruby
# add gem bin dir to path (put this in your initialization script if needed)
$ export PATH="$PATH:$(gem env path | sed 's#[^:]\+#&/bin#g')"
$ gem install bashly
#
dnf
- Fedora / CentOS / Red Hat
$ sudo dnf -y update
$ sudo dnf -y install @development-tools libyaml-devel ruby-devel
$ gem install bashly