Skip to content

Commit

Permalink
check for vagrant role in postgres and add bundle exec to rake command
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-wood committed Nov 19, 2014
1 parent e8c29e6 commit fe74942
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions script/setup_vagrant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,14 @@ else
gem install bundler --no-rdoc --no-ri -q
fi
echo 'Running bundle install...'
bundle install
bundle install --gemfile=$REFUGE_PATH/Gemfile

# Creating postres user
echo 'Creating vagrant postgres user...'
sudo -u postgres createuser vagrant --createdb --superuser
if ! psql -c 'SELECT rolname FROM pg_roles;' postgres | grep vagrant; then
echo 'Creating vagrant postgres user...'
sudo -u postgres createuser vagrant --createdb --superuser
fi

# Seed db
echo 'Seeding db...'
rake db:setup
bundle exec rake db:setup

0 comments on commit fe74942

Please sign in to comment.