Ubuntu-Rails

by mpagalan
4 deployments · 3 still active · last rev. 5 months ago

Initial import-With Git, Nginx, rbenv

Compatible with: Ubuntu 18.04 LTS
						#!/bin/bash
logfile="/root/log.txt"

export logfile
echo "StackScript Starting" >> $logfile
echo "********************" >> $logfile

echo "****UPDATE SYSTEM**************" >> $logfile
apt-get update

echo "****CURL GIT_CORE NGINX**************" >> $logfile
apt-get install curl git-core nginx -y

echo "****POSTGRESQL**************" >> $logfile
apt-get install postgresql postgresql-contrib libpq-dev -y

echo "****NODE.JS**************" >> $logfile
sudo apt-get install nodejs -y




echo "****FOR BUILDING RUBY**************" >> $logfile
apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev -y

echo "****CLONING RBENV**************" >> $logfile
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc

echo "****CLONING RUBY-BUILD**************" >> $logfile
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

echo "****INSTALL RBENV -L**************" >> $logfile
rbenv install -l

echo "****INSTALL RUBY 2.5.1**************" >> $logfile
rbenv install 2.5.1
rbenv global 2.5.1

echo "****SET GEM ENV**************" >> $logfile
echo "gem: --no-document" > ~/.gemrc

echo "****ECHO INSTALL BUNDLER**************" >> $logfile
gem install bundler
cd ~/.rbenv

git pull