Open sports database web admin tool in Ruby on Rails 5.2+
Try the sport.db
web admin demo running
on Heroku footballdb.herokuapp.com
.
Step 1 - Install all required gems / libraries
Note: For the local setup let's use SQLite (for production PostgreSQL). Thus, for the local setup skip install all the PostgreSQL libraries / machinery.
$ bundle install --without production
Step 2 - Create the database
$ rake db:migrate
Step 3 - Download and read-in all the database
Note: See the /datafile/world2018.rb for what datasets get included.
$ rake db:seed
That's it. Showtime! Startup the server.
$ rails s
Add a heroku remote:
$ heroku git:remote -a footballdb ## add remote via heroku tool
$ git remote -v ## checkup
heroku https://git.heroku.com/footballdb.git (fetch)
heroku https://git.heroku.com/footballdb.git (push)
Update app on heroku
$ git push heroku
Reset db on heroku
$ heroku pg:reset DATABASE_URL --confirm footballdb
Rebuild db on heroku
$ heroku run rake db:migrate
Run db seed on heroku
$ heroku run rake db:seed
Restart.
$ heroku restart
Done.
The sport.db.admin
scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
Send them along to the Open Sports Database & Friends Forum/Mailing List. Thanks!