Skip to content

Instantly share code, notes, and snippets.

@jmcdice
Last active November 4, 2016 19:27
Show Gist options
  • Save jmcdice/e15b981e9b114574e661185e61c249b8 to your computer and use it in GitHub Desktop.
Save jmcdice/e15b981e9b114574e661185e61c249b8 to your computer and use it in GitHub Desktop.
Install Bosh CLI
# Install ruby and the bosh cli
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
# Needed to compile ruby
sudo apt install -y libssl-dev libreadline-dev zlib1g-dev
~/.rbenv/bin/rbenv install 2.2.3
~/.rbenv/bin/rbenv global 2.2.3
~/.rbenv/shims/ruby -v
# Shouldn't have to do this but bosh-init doesn't seem to source
# .bashrc
# sudo cp ~/.rbenv/shims/ruby /usr/bin/
# Gimme the bosh cmd line client
~/.rbenv/shims/gem install bosh_cli --no-ri --no-rdoc
sudo ln -s ~/.rbenv/shims/bosh /usr/bin/bosh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment