-
Notifications
You must be signed in to change notification settings - Fork 0
/
vagrant_bootstrap.sh
41 lines (31 loc) · 1.15 KB
/
vagrant_bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
# enable console colors
sed -i '1iforce_color_prompt=yes' ~/.bashrc
# disable docs during gem install
echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc
# essentials
sudo apt-get -y update
sudo apt-get install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev libcurl4-openssl-dev curl wget
# SQLite, Git and Node.js
sudo apt-get install -y libsqlite3-dev git nodejs
# Qt and xvfb-run for Capybara Webkit
sudo apt-get install -y libqtwebkit-dev xvfb
# PostgreSQL
sudo apt-get install -y libpq-dev postgresql
# setup rbenv and ruby-build
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
# Install ruby 2.1.4 and bundler
export RBENV_ROOT="${HOME}/.rbenv"
export PATH="${RBENV_ROOT}/bin:${PATH}"
export PATH="${RBENV_ROOT}/shims:${PATH}"
rbenv install 2.2.2
rbenv global 2.2.2
gem install bundler
rbenv rehash
# Install Heroku
wget -O- https://toolbelt.heroku.com/install-ubuntu.sh | sh
# cleanup
sudo apt-get clean