From 984d9852da21908beedf47bcee5cd1237a55a01d Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 31 Oct 2014 12:02:29 -0600 Subject: install missing packages and create vagrant db. --- config/database.yml.vagrant | 15 +++++++++++++++ script/bootstrap-vagrant-user.sh | 15 +++++++++++++-- script/bootstrap.sh | 20 ++++++++++++++------ 3 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 config/database.yml.vagrant diff --git a/config/database.yml.vagrant b/config/database.yml.vagrant new file mode 100644 index 00000000..893f8915 --- /dev/null +++ b/config/database.yml.vagrant @@ -0,0 +1,15 @@ +development: + adapter: postgresql + encoding: unicode + database: cakeside + pool: 5 + username: vagrant + password: + +test: + adapter: postgresql + encoding: unicode + database: cakeside_test + pool: 5 + username: vagrant + password: diff --git a/script/bootstrap-vagrant-user.sh b/script/bootstrap-vagrant-user.sh index d517bd83..b74d2423 100644 --- a/script/bootstrap-vagrant-user.sh +++ b/script/bootstrap-vagrant-user.sh @@ -6,7 +6,18 @@ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-bu 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 update rbenv install 2.1.4 -gem install bundler +rbenv global 2.1.4 +gem install bundler --no-ri --no-rdoc +rbenv rehash cd /vagrant -bundle install +bundle install -j 4 +rbenv rehash +if [ ! -f /vagrant/config/database.yml ]; then + ln -s config/database.yml.vagrant config/database.yml +fi +if [ ! -f /vagrant/.env ]; then + ln -s .env.example .env +fi +bundle exec rake db:create db:migrate db:seed diff --git a/script/bootstrap.sh b/script/bootstrap.sh index 186491a0..39aea0dc 100644 --- a/script/bootstrap.sh +++ b/script/bootstrap.sh @@ -8,19 +8,27 @@ apt-get -y install zlib1g-dev libssl-dev apt-get -y install libreadline-gplv2-dev 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 install build-essential +apt-get -y install tklib +apt-get -y install zlib1g-dev libssl-dev +apt-get -y install libreadline-gplv2-dev +apt-get -y install libxml2 libxml2-dev libxslt1-dev +apt-get -y install curl libcurl3 libcurl3-gnutls libcurl4-openssl-dev apt-get -y autoremove + add-apt-repository -y ppa:nginx/stable apt-get -y update apt-get -y install nginx + add-apt-repository -y ppa:pitti/postgresql apt-get -y update -apt-get -y install postgresql-9.3 libpq-dev +apt-get -y install postgresql-9.3 libpq-dev postgresql-contrib-9.3 + add-apt-repository -y ppa:chris-lea/node.js apt-get -y update apt-get -y install nodejs -apt-get -y install build-essential -apt-get -y install tklib -apt-get -y install zlib1g-dev libssl-dev -apt-get -y install libreadline-gplv2-dev -apt-get -y install libxml2 libxml2-dev libxslt1-dev + +su postgres<