summaryrefslogtreecommitdiff
path: root/config/recipes/rbenv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/recipes/rbenv.rb')
-rw-r--r--config/recipes/rbenv.rb23
1 files changed, 11 insertions, 12 deletions
diff --git a/config/recipes/rbenv.rb b/config/recipes/rbenv.rb
index f37f04c..b84adc8 100644
--- a/config/recipes/rbenv.rb
+++ b/config/recipes/rbenv.rb
@@ -1,10 +1,19 @@
set_default :ruby_version, "2.0.0-p247"
-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"
+ # Install development tools:
+ run "#{sudo} apt-get -y install build-essential"
+ # Packages required for compilation of some stdlib modules
+ run "#{sudo} apt-get -y install tklib"
+ # Extras for RubyGems and Rails:
+ run "#{sudo} apt-get -y install zlib1g-dev libssl-dev"
+ # Readline Dev on Ubuntu 12.04 LTS:
+ run "#{sudo} apt-get -y install libreadline-gplv2-dev"
+ # Install some nokogiri dependencies:
+ run "#{sudo} apt-get -y install libxml2 libxml2-dev libxslt1-dev"
+
run "curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash"
bashrc = <<-BASHRC
if [ -d $HOME/.rbenv ]; then
@@ -17,16 +26,6 @@ BASHRC
run "mv ~/.bashrc.tmp ~/.bashrc"
run %q{export PATH="$HOME/.rbenv/bin:$PATH"}
run %q{eval "$(rbenv init -)"}
- # Install development tools:
- run "#{sudo} apt-get -y install build-essential"
- # Packages required for compilation of some stdlib modules
- run "#{sudo} apt-get -y install tklib"
- # Extras for RubyGems and Rails:
- run "#{sudo} apt-get -y install zlib1g-dev libssl-dev"
- # Readline Dev on Ubuntu 12.04 LTS:
- run "#{sudo} apt-get -y install libreadline-gplv2-dev"
- # Install some nokogiri dependencies:
- run "#{sudo} apt-get -y install libxml2 libxml2-dev libxslt1-dev"
run "rbenv install #{ruby_version}"
run "rbenv global #{ruby_version}"
run "gem install bundler --no-ri --no-rdoc"