Sha256: 1f25abab99ddd070a9fc2bd670eb9efdadcb1f0a243a7c97f407037204209cab

Contents?: true

Size: 1009 Bytes

Versions: 10

Compression:

Stored size: 1009 Bytes

Contents

set_default :ruby_version, "1.9.3-p194"
set_default :rbenv_bootstrap, "bootstrap-ubuntu-11-10"

namespace :rbenv do
	desc "Install rbenv, Ruby, and the Bundler gem"
	task :install, roles: :app do
		run "#{sudo} apt-get -y install curl git-core"
		run "curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash"
		bashrc = <<-BASHRC
if [ -d $HOME/.rbenv ]; then 
  export PATH="$HOME/.rbenv/bin:$PATH" 
  eval "$(rbenv init -)" 
fi
BASHRC
		put bashrc, "/tmp/rbenvrc"
		run "cat /tmp/rbenvrc ~/.bashrc > ~/.bashrc.tmp"
		run "mv ~/.bashrc.tmp ~/.bashrc"
		run %q{export PATH="$HOME/.rbenv/bin:$PATH"}
		run %q{eval "$(rbenv init -)"}
		# run "rbenv #{rbenv_bootstrap}"
		# Manual bootstrap
		run "#{sudo} apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev"
		run "rbenv install #{ruby_version}"
		run "rbenv global #{ruby_version}"
		run "gem install bundler --no-ri --no-rdoc"
		run "rbenv rehash"
	end
	after "deploy:install", "rbenv:install"
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rail_pass-0.2.0 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.10 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.9 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.8 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.7 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.6 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.5 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.4 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.3 lib/generators/templates/config/recipes/rbenv.rb
rail_pass-0.1.1 lib/generators/templates/config/recipes/rbenv.rb