summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-10-31 10:27:25 -0600
committermo khan <mo@mokhan.ca>2014-10-31 10:27:25 -0600
commit1d3d0b47dc6a97c92e9832de9ea33a96bed45436 (patch)
treea4cd049fbe2ca659d2b655b073623532fd0f457d /script
parent38da80374b5fdd471696d5e6994c0826a3add2ec (diff)
get ruby installed with gems for vagrant.
Diffstat (limited to 'script')
-rw-r--r--script/bootstrap-vagrant-user.sh12
-rw-r--r--script/bootstrap.sh16
2 files changed, 13 insertions, 15 deletions
diff --git a/script/bootstrap-vagrant-user.sh b/script/bootstrap-vagrant-user.sh
new file mode 100644
index 00000000..d517bd83
--- /dev/null
+++ b/script/bootstrap-vagrant-user.sh
@@ -0,0 +1,12 @@
+git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
+echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
+echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
+source ~/.bash_profile
+git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
+git clone https://github.com/tpope/rbenv-ctags.git ~/.rbenv/plugins/rbenv-ctags
+git clone https://github.com/rkh/rbenv-update.git ~/plugins/rbenv-update
+git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
+rbenv install 2.1.4
+gem install bundler
+cd /vagrant
+bundle install
diff --git a/script/bootstrap.sh b/script/bootstrap.sh
index f71edc3b..186491a0 100644
--- a/script/bootstrap.sh
+++ b/script/bootstrap.sh
@@ -1,15 +1,11 @@
#!/usr/bin/env bash
-
apt-get update -y
apt-get upgrade -y
apt-get -y install curl git-core python-software-properties imagemagick libmagickwand-dev memcached
apt-get -y install build-essential
apt-get -y install tklib
-# Extras for RubyGems and Rails:
apt-get -y install zlib1g-dev libssl-dev
-# Readline Dev on Ubuntu 12.04 LTS:
apt-get -y install libreadline-gplv2-dev
-# Install some nokogiri dependencies:
apt-get -y install libxml2 libxml2-dev libxslt1-dev
apt-get -y install gawk libreadline6-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
apt-get -y autoremove
@@ -23,18 +19,8 @@ add-apt-repository -y ppa:chris-lea/node.js
apt-get -y update
apt-get -y install nodejs
apt-get -y install build-essential
-# Packages required for compilation of some stdlib modules
apt-get -y install tklib
-# Extras for RubyGems and Rails:
apt-get -y install zlib1g-dev libssl-dev
-# Readline Dev on Ubuntu 12.04 LTS:
apt-get -y install libreadline-gplv2-dev
-# Install some nokogiri dependencies:
apt-get -y install libxml2 libxml2-dev libxslt1-dev
-
-git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
-echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
-echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
-source ~/.bash_profile
-git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
-rbenv install 2.1.3
+su -c "source /vagrant/script/bootstrap-vagrant-user.sh" vagrant