I am trying to install Bundler on my VPS using Ansible.
I already have rbenv set up and the global ruby is 2.1.0.
If I SSH as root into the server and run
The cleanest and quickest way to install bundler using Ansible is this:
Simply install rbenv by using the role https://github.com/zzet/ansible-rbenv-role and by configuring its plugins like so (obviously, there are more parameters to configure than just the plugins):
rbenv_plugins:
- { name: 'ruby-build',
repo: 'https://github.com/rbenv/ruby-build.git',
version: master }
- { name: 'rbenv-default-gems',
repo: 'https://github.com/rbenv/rbenv-default-gems.git',
version: master }
The included plugin rbenv-default-gems will add bundler by default and into the right directory during the installation process of the version of ruby you will have spcecified.
Then make sure bundler is in PATH.
That's it.