diff --git a/rails/bin/rvm/setup b/rails/bin/rvm/setup index 91ac0a6..a4b2250 100755 --- a/rails/bin/rvm/setup +++ b/rails/bin/rvm/setup @@ -4,6 +4,6 @@ typeset -gx rvm_is_not_a_function rvm_is_not_a_function=0 -# $HOME/.rvm/bin/rvm ${ruby_string} +log "Setting ${ruby_string} to default (this will install if not installed and thus may take a while so please be patient)." $HOME/.rvm/bin/rvm alias create default ${ruby_string} diff --git a/rails/bin/setup b/rails/bin/setup index 2ba5a50..8a5a0f3 100755 --- a/rails/bin/setup +++ b/rails/bin/setup @@ -4,17 +4,28 @@ if user is root ; then log error "May only be run as root." ; fi if ! file exists "${HOME}/.env" then + log "Installing ~/.env environment file" template install "rails/env" to "${HOME}/.env" mode 0640 \ variables port "${port:=6000}" fi # First ensure that ~/.smrc exists and is setup. +log "Setting up ~/.smrc" sm rails smrc + +log "Configuring profiles" sm rails profiles configure + +log "Configuring ~/shared" sm rails shared configure + +log "Configuring database" sm rails database configure + +log "Configuring ~/.rvmrc" sm rails rvm configure +log "Installing deploy hooks ~/shared/deploy/{before_release, after_release}." for file in before_release after_release do if ! file exists "${shared_path}/deploy/${file}" @@ -28,12 +39,19 @@ done if ! path exists "$shared_path/$project" then fetch_uri "$repository_url" "$shared_path/$project" ${scm_flags[@]} ; fi +log "Installing RVM" sm rails rvm install + +log "Setting up RVM" sm rails rvm setup +log "Setting up application server" setup_application_server || true +log "Installing deploy extension" sm ext install deploy + +log "Running initial deploy" sm deploy bootstrap_gems