World Cup 2014 Match Picks/Predictions (w/ Open Source Sportbook Rails Web App)

131 views
Skip to first unread message

Gerald Bauer

unread,
Jun 1, 2014, 6:33:17 AM6/1/14
to open...@googlegroups.com
Hello,

I've reconfigured the sportbook [1] - an open source Ruby on Rails
web app for match picks/predictions - for the World Cup 2014 in Brazil
(11 days an counting!).

The sportdb gem lets you load the plain text fixtures into your SQL
database of choice; see the worldcup.db [2] fixtures in plain text or
served up via a web app [3] or try the World Cup Brazil 2014 picks
demo [4] (login with demo/demo).

Cheers.

[1] github.com/openbookie/sportbook
[2] github.com/openfootball/world-cup/tree/master/2014--brazil
[3] sportbook.herokuapp.com/db/world.2014
[4] sportbook.herokuapp.com

red band

unread,
Jun 3, 2014, 3:37:49 AM6/3/14
to open...@googlegroups.com
Tried following the instructions to build this but it looks like the db fails to create... Do I miss something?
Does the db need to be created first?

git clone git://github.com/openbookie/sportbook.git
cd sportbook
bundle install --without production

rake db:setup

rails server


The server starts, I'm presented with the login screen but it rejects demo/demo

Grtz

Red

Gerald Bauer

unread,
Jun 3, 2014, 6:00:46 AM6/3/14
to open...@googlegroups.com
Hello,

  Thanks for your interest in sportbook. Please, replace the all-in-one database setup command 

$ rake db:setup 

   with two steps

$ rake db:migrate                       # will create the database tables / schema
$ rake db:seed DATA=demo       # will load all data for the demo setup

   Let us know if it works. Cheers.

red band

unread,
Jun 3, 2014, 6:37:50 AM6/3/14
to open...@googlegroups.com
No, it still fails, and it looks like it could be the same place as when I ran rake db:setup
rake aborted!
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: alltime_standing_entries: DELETE FROM "alltime_standing_entries"

Is this table missing from the schema?

Grtz

Red

Gerald Bauer

unread,
Jun 3, 2014, 8:53:29 AM6/3/14
to open...@googlegroups.com
Hello,
Thanks for the info. I just tried a new installation. It works.

Sorry. Note: If you update an installation you have to delete the
database first! Sorry, the sportbook does NOT use auto database
migration magic (most tables reside in gems). If the schema changes
(e.g. gets new tables or fields) you have to recreate the database
(and delete the database first)

If your installation is an update, please delete your database and recreate:

$ rake db:migrate

You should see

-- create_table(:alltime_standings)
-> 0.0010s
-- create_table(:alltime_standing_entries)
-> 0.0010s
...

Let us know if it works. Good luck. Cheers.
> --
> You received this message because you are subscribed to the Google Groups
> "Open Sport(s) Database - football.db, formula1.db, ski.db, and Friends"
> group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opensport+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

red band

unread,
Jun 3, 2014, 11:10:47 AM6/3/14
to open...@googlegroups.com
Aah, that sorted it out!  I had deleted everything and restarted a couple of times but always with the rake db:setup deleting the db and using rake db:migrate then seed worked great.

Thank you very much for your efforts producing this and the help to get it working.

How will the knock-out stages work? are these added by the fixtures page in admin?

btw all of the users in the demo seem to have access to admin and can change anything seems to be the same on your herukoapp demo.
Is there a way to restrict normal users to only use the main app?

Grtz

Red

Gerald Bauer

unread,
Jun 3, 2014, 12:23:17 PM6/3/14
to open...@googlegroups.com
Hello,
Thanks for the update. Good to know its working.

> How will the knock-out stages work? are these added by the fixtures page
> in admin?

You can update all results and the fixtures using a rake task:

$ rake update

And that's the source:

desc 'sportbook: auto-update fixtures'
task :update => [:environment] do |t|
SportDb.update!
end

> btw all of the users in the demo seem to have access to admin and can
> change anything seems to be the same on your herukoapp demo.
> Is there a way to restrict normal users to only use the main app?

Good point. For now everybody has access if you know the admin link.
The admin login required functionality needs to get added. Cheers.
Reply all
Reply to author
Forward
0 new messages