Last active
August 29, 2015 14:07
-
-
Save ku1ik/0f7433ee54af14d9fa3c to your computer and use it in GitHub Desktop.
Installing Ruby 2.1 on Ubuntu 14.04 with ansible
This file contains 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 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 | |
/usr/bin/ruby | |
ubuntu@srv-blah:~$ ruby -v | |
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux-gnu] |
This file contains 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
your.box.hostname.com |
This file contains 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
--- | |
- hosts: all | |
remote_user: ubuntu | |
sudo: true | |
tasks: | |
- 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