Skip to content

Commit d5cae27

Browse files
committed
installs 1.9.3 as a RVM binary
With this change we still have the speed of a binary install, but getting a much recent patchlevel than the -p0 in Ubuntu.
1 parent 7dcce35 commit d5cae27

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ Port 3000 in the host computer is forwarded to port 3000 in the virtual machine.
3333

3434
* Git
3535

36-
* Ruby 1.9.3
36+
* RVM
37+
38+
* Ruby 1.9.3 (binary RVM install)
3739

3840
* Bundler
3941

puppet/manifests/default.pp

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
Exec {
2+
path => ['/usr/sbin', '/usr/bin', '/sbin', '/bin']
3+
}
4+
15
$ar_databases = ['activerecord_unittest', 'activerecord_unittest2']
6+
$as_vagrant = 'sudo -u vagrant -H bash -l -c'
27

38
# Make sure apt-get -y update runs before anything else.
49
stage { 'preinstall':
510
before => Stage['main']
611
}
712

813
class apt_get_update {
9-
exec { '/usr/bin/apt-get -y update':
10-
user => 'root'
14+
exec { 'apt-get -y update':
15+
user => 'root',
16+
unless => 'test -e /home/vagrant/.rvm'
1117
}
1218
}
1319
class { 'apt_get_update':
@@ -97,19 +103,37 @@
97103
}
98104
class { 'install_core_packages': }
99105

100-
class install_ruby {
101-
package { 'ruby1.9.3':
106+
class install_curl {
107+
package { 'curl':
102108
ensure => installed
103109
}
110+
}
111+
class { 'install_curl': }
104112

105-
exec { '/usr/bin/gem install bundler --no-rdoc --no-ri':
106-
unless => '/usr/bin/gem list | grep bundler',
107-
user => 'root',
108-
require => Package['ruby1.9.3']
113+
class install_rvm {
114+
exec { "${as_vagrant} 'curl -L https://get.rvm.io | bash -s master'":
115+
creates => '/home/vagrant/.rvm',
116+
require => Class['install_curl']
117+
}
118+
}
119+
class { 'install_rvm': }
120+
121+
class install_ruby {
122+
exec { "${as_vagrant} 'rvm install 1.9.3 --latest-binary && rvm use 1.9.3 --default'":
123+
creates => '/home/vagrant/.rvm/bin/ruby',
124+
require => Class['install_rvm']
109125
}
110126
}
111127
class { 'install_ruby': }
112128

129+
class install_bundler {
130+
exec { "${as_vagrant} 'gem install bundler --no-rdoc --no-ri'":
131+
creates => '/home/vagrant/.rvm/bin/bundle',
132+
require => Class['install_ruby']
133+
}
134+
}
135+
class { 'install_bundler': }
136+
113137
class install_nokogiri_dependencies {
114138
package { ['libxml2', 'libxml2-dev', 'libxslt1-dev']:
115139
ensure => installed

0 commit comments

Comments
 (0)