Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View install_rbenv.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
 
namespace :deploy do
desc "install rbenv needed for hemnet"
task :install_rbenv, :roles => :app do
run "curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash"
init_string = '
if [[ -d $HOME/.rbenv ]]; then
export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims/:$PATH"
eval "$(rbenv init -)"
fi
'
put init_string , "/tmp/add_to_dot-files"
run "grep -q rbenv ~/.bashrc || cat /tmp/add_to_dot-files >> ~/.bashrc"
run "grep -q rbenv ~/.bash_profile || cat /tmp/add_to_dot-files >> ~/.bash_profile"
end
end
View install_rbenv.rb
1 2 3 4 5 6 7 8 9 10 11 12 13
 
namespace :deploy do
desc "install ruby needed for hemnet"
task :install_ruby, :roles => :app do
run "rbenv install 1.9.2-p290"
run "rbenv global 1.9.2-p290"
end
end
 
 
before "deploy:install_ruby", "deploy:install_rbenv"
before "deploy:install_rubygem" , "deploy:install_ruby"
before "deploy:setup", "deploy:install_rubygem"
View install_rbenv.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
 
namespace :deploy do
desc "install rubygem version needed for hemnet"
task :install_rubygem, :roles => :app do
rvm_cmds = [
"gem update --system 1.5.3" ,
"gem install bundler -v 1.0.21"
].each do |cmd|
run cmd
end
end
end
 
 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.