Skip to content

Instantly share code, notes, and snippets.

@Sarafian
Created January 21, 2020 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sarafian/b3c472ebf129f1c7d8576960973c8fa1 to your computer and use it in GitHub Desktop.
Save Sarafian/b3c472ebf129f1c7d8576960973c8fa1 to your computer and use it in GitHub Desktop.
Install Ruby and Jenkins on Visual Studio Online environment.
# 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