Fix user to run rake task for dbsetup

This commit is contained in:
Adriano Vieira 2017-11-30 17:23:51 -02:00
parent 92f27561df
commit fe8483b92e

View file

@ -65,7 +65,7 @@ if [ ! -f /vagrant/config/database.yml ] && [ -f /vagrant/config/database.yml.ex
echo -e "\nSetting up your database from config/database.yml...\n"
cp config/database.yml.example config/database.yml
if [ ! -f db/development.sqlite3 ] && [ ! -f db/test.sqlite3 ]; then
bundle exec rake db:setup
su - vagrant -c "cd /vagrant/; bundle exec rake db:setup"
else
echo -e "\n\nWARNING: You have already have a development/test database."
echo -e "WARNING: Please make sure this database works in this vagrant box!\n\n"