Skip to content

Instantly share code, notes, and snippets.

@imarcelolz
Created April 2, 2017 18:05
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 imarcelolz/8b5c8a5572e94d85c0821641e4121a7d to your computer and use it in GitHub Desktop.
Save imarcelolz/8b5c8a5572e94d85c0821641e4121a7d to your computer and use it in GitHub Desktop.
NosqlBA - 2017 - Script para ambiente Rails no Ubuntu 16.04
#!/bin/bash
sudo apt update
sudo apt dist-upgrade -y
# server tools
sudo apt -y install git nodejs
# Ruby dependencies
sudo apt -y build-dep ruby
sudo apt install -y \
make build-essential libc6-dev libssl-dev libffi-dev \
libreadline6-dev libreadline-dev zlib1g-dev libyaml-dev
# Se quiser utilizar postgresql - use esta linha
# sudo apt install -y postgresql
# Se quiser utilizar mysql - use esta linha
# sudo apt install -y mysql-server
# Se quiser utilizar mongodb - use esta linha
# sudo apt install -y mongodb
# Gem dependencies, Nokogiri, Databases
sudo apt -y install \
libpq-dev libmysql++\-dev libsqlite3-dev \
libxml2-dev libxslt-dev imagemagick
#rbenv!
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
rbenv install 2.4.1
rbenv global 2.4.1
rbenv rehash
gem install bundler
gem install rails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment