Last active
December 17, 2018 19:43
-
-
Save jcefoli/bde7ad135b5b4227ffb2f2b2b0897431 to your computer and use it in GitHub Desktop.
Install Ruby Using rbenv on Windows 10 Ubuntu 18.04 Emulation
This file contains hidden or 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 | |
## This will install Ruby using rbenv on the Windows 10 Ubuntu Subsystem | |
## The travis gem did not compile correctly when I installed via 'apt-get install ruby' but worked using this method | |
sudo apt-get -y install build-essential libreadline-dev zlib1g-dev | |
cd ~ | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
exec $SHELL | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
exec $SHELL | |
rbenv install 2.5.3 | |
rbenv global 2.5.3 | |
ruby -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment