Sha256: e31ee6e75e60b38a43d51e5e633d3a67e2fd01b594ab9de0ff21b42eae1558fb

Contents?: true

Size: 921 Bytes

Versions: 7

Compression:

Stored size: 921 Bytes

Contents

set_default :ruby_version, "1.9.3-p125"
set_default :rbenv_bootstrap, "bootstrap-ubuntu-12-04"

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}"
    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

7 entries across 7 versions & 1 rubygems

Version Path
nubis_rails_boilerplate-0.0.11 lib/capistrano_recipes/rbenv.rb
nubis_rails_boilerplate-0.0.10 lib/capistrano_recipes/rbenv.rb
nubis_rails_boilerplate-0.0.9 lib/capistrano_recipes/rbenv.rb
nubis_rails_boilerplate-0.0.8 lib/capistrano_recipes/rbenv.rb
nubis_rails_boilerplate-0.0.7 lib/capistrano_recipes/rbenv.rb
nubis_rails_boilerplate-0.0.6 lib/capistrano_recipes/rbenv.rb
nubis_rails_boilerplate-0.0.5 lib/capistrano_recipes/rbenv.rb