Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Installing Ruby 2.1 on Ubuntu 14.04 with ansible
Install ansible on your laptop, then:
ansible-playbook -i production site.yml
After running this confirm ruby version on the server:
ubuntu@srv-blah:~$ which ruby
ubuntu@srv-blah:~$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux-gnu]
- hosts: all
remote_user: ubuntu
sudo: true
- name: add brightbox ruby repository
apt_repository: repo='ppa:brightbox/ruby-ng'
- name: install ruby 2.1
apt: pkg=ruby2.1 state=present
- name: install ruby 2.1 dev headers
apt: pkg=ruby2.1-dev state=present
- name: install bundler
gem: name=bundler state=present user_install=no
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment