Last active
January 16, 2020 16:23
-
-
Save paulosevero/6de260bcb9772794e797fccf6c88610a to your computer and use it in GitHub Desktop.
Installing and Configuring Ruby on Rails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Dependencies | |
| curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
| 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-get update | |
| sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev nodejs yarn | |
| # Configuring RBENV for ruby versions management | |
| # Installing RBENV | |
| cd | |
| git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
| echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
| exec $SHELL | |
| # Installing RBENV's Ruby Build | |
| git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
| echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
| exec $SHELL | |
| # Installing Ruby 2.5.1 | |
| rbenv install 2.5.1 | |
| rbenv global 2.5.1 | |
| # Installing Bundler | |
| gem install bundler | |
| # Installing NodeJS | |
| curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
| sudo apt-get install -y nodejs | |
| # Installing Ruby on Rails | |
| gem install rails | |
| # Installing and Setting up PostgreSQL | |
| sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list" | |
| wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-common | |
| sudo apt-get install postgresql-9.5 libpq-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment