Created
January 21, 2020 10:15
-
-
Save Sarafian/b3c472ebf129f1c7d8576960973c8fa1 to your computer and use it in GitHub Desktop.
Install Ruby and Jenkins on Visual Studio Online environment.
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
# Install ruby-build | |
sudo apt install ruby-build -y | |
# Install Ruby 2.4.0 | |
rbenv install 2.4.0 | |
# Add rbenv initialization to profile | |
echo 'export PATH="$HOME/.rbenv/shims:$PATH"' >> ~/.bash_profile | |
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile | |
# Execute the profile script | |
source ~/.bash_profile | |
# Set Ruby 2.4.0 version as global preference | |
rbenv global 2.4.0 | |
# Add gem initialization to profile | |
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc | |
echo 'export GEM_HOME=$HOME/gems' >> ~/.bashrc | |
echo 'export PATH=$HOME/gems/bin:$PATH' >> ~/.bashrc | |
# execute the profile script | |
source ~/.bashrc | |
# Update gem | |
sudo gem update --system | |
# Install Jekyll and Bundler | |
gem install jekyll bundler |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment