Bash Related Commands
Brew
Use brew instead of manually install packages so all users can use the same libs https://brew.sh/
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# run those three commands, just replace 'dule' with your username
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /home/dule/.profile
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/dule/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
Rbenv
Install rbenv and openssl 1.1
brew install rbenv ruby-build [email protected]
Remove rvm and install rbenv https://gist.github.com/akdetrick/7604130
# follow steps
rbenv init
For rbenv to be able to find bin from gems you need to add
# .bashrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
When you install new gems, sometimes you need to rehash to create new shims https://github.com/rbenv/rbenv#rbenv-rehash
gem install jekyll
rbenv rehash
jekyll
Install and change to that version
rbenv install 3.2.0
rbenv shell 3.2.0 # this export RBENV_VERSION=3.2.0
For compilers to find [email protected] you may need to set (this is needed for rvm):
export LDFLAGS="-L/home/linuxbrew/.linuxbrew/opt/[email protected]/lib"
export CPPFLAGS="-I/home/linuxbrew/.linuxbrew/opt/[email protected]/include"
export PKG_CONFIG_PATH="/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/pkgconfig"
# To install version of ruby that uses openssl 1.1 we need to use RUBY_CONFIGURE_OPTS
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix [email protected]`"
Wall
Enable tty group so user can send messages https://unix.stackexchange.com/a/313558/150895