Skip to content

Instantly share code, notes, and snippets.

@donrestarone
Last active October 23, 2020 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donrestarone/dcaa65a670e06903c56b04e35d04c2f7 to your computer and use it in GitHub Desktop.
Save donrestarone/dcaa65a670e06903c56b04e35d04c2f7 to your computer and use it in GitHub Desktop.
barebones rails install for ec2
#to run curl link_to_this_raw_gist | sudo bash
sudo apt-get update -y && sudo apt-get upgrade -y
sudo apt install curl -y
sudo apt-get install tmux -y
sudo apt install nodejs -y && sudo apt install npm -y
sudo apt-get install htop build-essential zlib1g-dev openssl libreadline6-dev git-core zlib1g libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf automake libtool bison libgecode-dev -y && sudo apt-get install libpq-dev -y
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc && echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv && git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
source ~/.bashrc
rbenv install 2.6.6 && rbenv global 2.6.6 && echo 'gem: --no-ri --no-rdoc' >> ~/.gemrc && source ~/.bashrc && gem install bundler:2.1.4 && gem install rails
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update -y
sudo apt install yarn -y
sudo apt-get install nginx -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment