Sha256: 5a8c7b4ff63bc4e5a538243252d8af571111d5d83f875df5854677a0d12bfca4

Contents?: true

Size: 1009 Bytes

Versions: 36

Compression:

Stored size: 1009 Bytes

Contents

DEPLOYER_NAME=<%= @attributes.deployer_name %>
DEPLOYER_PATH=/home/$DEPLOYER_NAME
RBENV_PATH=$DEPLOYER_PATH/.rbenv
PLUGINS_PATH=$RBENV_PATH/plugins
PROFILE=$DEPLOYER_PATH/.bashrc
RUBY_VERSION=<%= @attributes.ruby_version %>
RBENV_EXPORT_PATH="export PATH=\"$RBENV_PATH/bin:$PLUGINS_PATH/ruby-build/bin:$PATH\""
RBENV_INIT='eval "$(rbenv init -)"'

if sunzi.to_be_done "install ruby"; then
  git clone git://github.com/sstephenson/rbenv.git $RBENV_PATH
  git clone git://github.com/sstephenson/ruby-build.git $PLUGINS_PATH/ruby-build
  git clone git://github.com/sstephenson/rbenv-gem-rehash.git $PLUGINS_PATH/rbenv-gem-rehash
  git clone git://github.com/dcarley/rbenv-sudo.git $PLUGINS_PATH/rbenv-sudo

  eval $RBENV_EXPORT_PATH
  eval $RBENV_INIT
  echo $RBENV_EXPORT_PATH >> $PROFILE
  echo $RBENV_INIT >> $PROFILE

  rbenv install $RUBY_VERSION
  rbenv global $RUBY_VERSION
  echo 'gem: --no-ri --no-rdoc' > $DEPLOYER_PATH/.gemrc
  gem install bundler
  gem install backup

  sunzi.done "install ruby"
fi

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
o2webappizer-0.2.6 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.2.5 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.2.4 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.2.3 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.2.2 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.2.1 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.2.0 templates/config/sunzi/recipes/ruby.sh
sunzi-rails-0.2.19 lib/templates/create/recipes/ruby.sh
o2webappizer-0.1.15 templates/config/sunzi/recipes/ruby.sh
sunzi-rails-0.2.18 lib/templates/create/recipes/ruby.sh
o2webappizer-0.1.14 templates/config/sunzi/recipes/ruby.sh
sunzi-rails-0.2.17 lib/templates/create/recipes/ruby.sh
sunzi-rails-0.2.16 lib/templates/create/recipes/ruby.sh
sunzi-rails-0.2.15 lib/templates/create/recipes/ruby.sh
o2webappizer-0.1.13 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.1.12 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.1.11 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.1.10 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.1.9 templates/config/sunzi/recipes/ruby.sh
o2webappizer-0.1.8 templates/config/sunzi/recipes/ruby.sh