Automatically run ~/.rbenv/before-install
before and ~/.rbenv/after-install
after rbenv install
.
Also run ~/.rbenv/before-uninstall
before and ~/.rbenv/after-uninstall
after rbenv uninstall
.
Add extension .eval
to eval instead of running those binaries.
Don't forget to run chmod u+x
on every script.
Note that without .eval
extension it must be a bash script, otherwise it can be any proper executable.
Set environment variables for installing ruby in before-install.eval
:
case $VERSION_NAME in
2.*) export CC=clang;;
esac
Update rubygems, install few gems and rehash in after-install
:
#!/usr/bin/env bash
gem update --system
gem install rake pry bundler rubygems-bundler mate
gem install nokogiri -- --use-system-libraries
rbenv rehash
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/toy/rbenv-around-install.git "$(rbenv root)"/plugins/around-install