Sha256: f0be89da5856d30c111215adf4d84ed9f99914bf039c48553ceb646f06d32b3e

Contents?: true

Size: 786 Bytes

Versions: 7

Compression:

Stored size: 786 Bytes

Contents

# Install Application Server

# Required attributes: env, ruby_version
export ENVIRONMENT=$(cat attributes/environment)
export RUBY_VERSION=$(cat attributes/ruby_version)

# Install RVM
source recipes/rvm.sh

# Set RAILS_ENV
if grep -Fq "RAILS_ENV" ~/.bash_profile; then
  echo 'RAILS_ENV entry already exists'
else
  echo "export RAILS_ENV=$ENVIRONMENT" >> ~/.bash_profile
  source ~/.bash_profile
fi

# Install Ruby
if [[ "$(which ruby)" == /usr/local/rvm/rubies/ruby-$RUBY_VERSION* ]]; then
  echo 'ruby-$RUBY_VERSION already installed'
else
  aptitude -y install curl build-essential libssl-dev libreadline6-dev
  rvm install $RUBY_VERSION
  rvm $RUBY_VERSION --default
  echo 'gem: --no-ri --no-rdoc' > ~/.gemrc

  # Install RubyGems
  gem update --system
  gem install bundler
fi

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sunzi-1.0.0 lib/templates/create/roles/app.sh
sunzi-0.9.0 lib/templates/create/roles/app.sh
sunzi-0.8.0 lib/templates/create/roles/app.sh
sunzi-0.7.0 lib/templates/create/roles/app.sh
sunzi-0.6.0 lib/templates/create/roles/app.sh
sunzi-0.5.1 lib/templates/create/roles/app.sh
sunzi-0.5.0 lib/templates/create/roles/app.sh