summaryrefslogtreecommitdiff
path: root/config/recipes/rbenv.rb
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-26 09:25:54 -0700
committermo khan <mo@mokhan.ca>2013-07-26 09:25:54 -0700
commit6dead347a06849a67e87dfdb36ca63efc05e7024 (patch)
tree1831f47cccdc06efc59b6765e901846f7ffde3d4 /config/recipes/rbenv.rb
parent180f5486575b535de3f56d0a124c95b2f2f4a621 (diff)
parentf6f238c88a0324a3ee60783479e35671b50bdf32 (diff)
Merge pull request #13 from madebyuppercut/ty
run db migrations by default
Diffstat (limited to 'config/recipes/rbenv.rb')
-rw-r--r--config/recipes/rbenv.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/recipes/rbenv.rb b/config/recipes/rbenv.rb
index b84adc8..0c4d905 100644
--- a/config/recipes/rbenv.rb
+++ b/config/recipes/rbenv.rb
@@ -1,7 +1,7 @@
set_default :ruby_version, "2.0.0-p247"
namespace :rbenv do
- desc "Install rbenv, Ruby, and the Bundler gem"
+ desc "Install rbenv"
task :install, roles: :app do
# Install development tools:
run "#{sudo} apt-get -y install build-essential"
@@ -26,10 +26,15 @@ BASHRC
run "mv ~/.bashrc.tmp ~/.bashrc"
run %q{export PATH="$HOME/.rbenv/bin:$PATH"}
run %q{eval "$(rbenv init -)"}
+ end
+ after "deploy:install", "rbenv:install"
+
+ desc "Setup rbenv with ruby and bundler"
+ task :setup, roles: :web do
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"
+ after "deploy:setup", "rbenv:setup"
end