Skip to content

Instantly share code, notes, and snippets.

@lmduc
Last active June 28, 2016 07:07
Show Gist options
  • Save lmduc/30f94ff3f0448e873d047fda5bb81136 to your computer and use it in GitHub Desktop.
Save lmduc/30f94ff3f0448e873d047fda5bb81136 to your computer and use it in GitHub Desktop.
Setup Sinatra server running on Thin using the default Ruby 1.9.3
echo 'INSTALL NEEDED LIBS FOR THE OS'
sudo apt-get update
sudo apt-get install -y git make g++ git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev ruby-dev libpq-dev yui-compressor
echo 'INSTALL nodejs'
(curl -sL https://deb.nodesource.com/setup_6.x | sudo sh) && sudo apt-get install -y nodejs
echo 'INSTALL rbenv'
cd && git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
cd && git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile
echo 'INSTALL RUBY 2.3.0'
PATH=$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH && eval "$(rbenv init -)" && rbenv install -v 2.3.0 && rbenv global 2.3.0
echo 'INSTALL DOCKER'
curl -fsSL https://get.docker.com/ | sh
sudo usermod -aG docker $(whoami)
echo 'INSTALL NEED GEMS'
gem install sinatra
gem install sinatra-contrib
gem install thin
echo 'YOU NEED TO CLONE THE PROJECT AND LOGOUT TO TAKE EFFECT'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment