5
6
7
8
9
10
11
12
13
14
|
# File 'lib/ami/installer/ruby_under_rbenv.rb', line 5
def self.install(version, ssh)
ssh.run 'sudo apt-get update'
ssh.run 'sudo apt-get -y install make gcc git zlib1g-dev libreadline-dev libyaml-dev libxml2-dev libxslt-dev libssl-dev'
ssh.run 'git clone git://github.com/sstephenson/rbenv.git ~/.rbenv'
ssh.run %q{echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile}
ssh.run %q{echo 'eval "$(rbenv init -)"' >> ~/.bash_profile}
ssh.run 'mkdir -p ~/.rbenv/plugins'
ssh.run 'git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build/'
ssh.run "~/.rbenv/bin/rbenv install #{version}"
end
|