Puppet Class: rubyenv

Defined in:
manifests/init.pp

Overview

Configure Ruby environment for system

Parameters:

  • versions (Any) (defaults to: ['2.2.4', '2.0.0-p648', '1.9.3-p551'])
  • default (Any) (defaults to: '2.2.4')


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/init.pp', line 2

class rubyenv(
  $versions = ['2.2.4', '2.0.0-p648', '1.9.3-p551'],
  $default = '2.2.4',
) {
  include ruby

  ruby::version { $versions: }

  class { 'ruby::global':
    version => $default
  }

  ruby_gem { 'bundler for all rubies':
    gem          => 'bundler',
    ruby_version => '*'
  }

  Ruby_gem <| |> ~>
  file { "/Users/${::user}/.rbenv":
    ensure => 'absent',
    force  => true
  }

  file { ['/usr/local/bin/bundler', '/usr/local/bin/bundle']:
    ensure  => absent,
    require => Ruby_gem['bundler for all rubies']
  }
}