Last active
December 14, 2020 19:49
-
-
Save fernandolopez/6709555 to your computer and use it in GitHub Desktop.
Instalación de Ruby 2 con rbenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -d "$HOME/.rbenv" ]; then | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile | |
echo 'eval "$(rbenv init -)"' >> ~/.profile | |
fi | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
rbenv install 2.0.0-p247 | |
rbenv rehash | |
rbenv global 2.0.0-p247 | |
gem install wirble | |
cat > ~/.irbrc <<EOF | |
begin | |
require 'wirble' | |
Wirble.init | |
Wirble.colorize | |
rescue LoadError => err | |
require 'irb/completion' | |
warn "Error cargando 'wirble': #{err}" | |
end | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget -O- https://gist.github.com/fernandolopez/6709555/raw/8d611c6b424b5eba8ddd5ff2a9819d688b0887d4/deploy_ruby.sh | bash -s