I created reset_db.sh (with chmod +x) with the following content:
#!/bin/bash
echo "*** Deleting the database ***"
rake db:drop --trace
echo "*** Creating the database ***"
rake db:create --trace
echo "*** Migrating the database ***"
rake db:migrate --trace
echo "*** Seeding the database ***"
rake db:seed --trace
echo "*** Done! ***"
However, when I run:
bash reset_db.sh
I see:
*** Deleting the database ***
*** Creating the database ***
*** Migrating the database ***
*** Seeding the database ***
*** Done! ***
but the rake commands were not executed.
Any ideas why ?
Bonus question:
What should I do in order to be able to run reset_db.sh rather than bash reset_db.sh ?