Skip to content

Instantly share code, notes, and snippets.

@maiconkcond
Created October 1, 2017 23:22
Show Gist options
  • Save maiconkcond/67174b2f67c6438c365f76c8bb34937e to your computer and use it in GitHub Desktop.
Save maiconkcond/67174b2f67c6438c365f76c8bb34937e to your computer and use it in GitHub Desktop.
Guide - Ruby on Rails Environment
Configurção:
● ruby
● rails
● git
● mysql
● postgreSQL
● node.js
Atualizar Sistema:
$ sudo apt-get update
$ sudo apt-get upgrade
Instalação de pacotes:
$ sudo apt-get install -y build-essential autoconf bison libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev
libgdbm-dev
Instalação e Configuração do Git:
$ sudo apt-get install git
$ git config --global user.name '<seu nome>'
$ git config --global user.email <seu email>
$ git config -l
Instalando Ruby (via RVM) - https://rvm.io/rvm/install
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
$ sudo apt-get install curl
$ curl -sSL https://get.rvm.io | bash
Iniciar o RVM pela primeira vez
$ source /home/vagrant/.rvm/scripts/rvm
Lista versões do Ruby para instalação:
$ rvm list known
Instala uma versão:
$ rvm install 2.1
Usar a versão:
$ rvm use 2.1
Definir versão como default:
$ rvm --default use 2.1.1
Instalando o Rails
$ gem install rails -v 4.2.5
Instalado NodeJS (ExecJS)
$ sudo apt-get install nodejs
Instalando o MySQL
$ sudo apt-get install mysql-client mysql-server libmysqlclient-dev
Acessando o MySQL:
$ mysql -u root -p
Instalando o PostgreSQL
$ sudo apt-get install postgresql postgresql-contrib libpq-dev
Criando um usuario:
$ sudo -u postgres createuser -rds vagrant
Criando um banco:
$ createdb vagrant
Acessar o PostgreSQL
$ psql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment