World Cup Fun with Ruby on Rails


TL;DR – just go here ->


The World Cup is in full swing and While watching the Brazil v Chile game yesterday I figured I would play around with the unofficial World Cup API. You know the saying “if you don’t use it, you lose it”? Well, it seems very true for me when it comes to coding. It seems like I have to constantly re-teach myself things when I don’t code for a month or so. On with the fun.


William Lam posted on twitter about The World Cup API and Alan “Super PowerCLI Guy” Renouf even made some PowerShell cmdlets in his article PowerShell your world cup.



Of course, I’m not much for PowerShell so I wanted to create a small rails application. After a few hours of work and doing some twitter bootstrap formatting I had a pretty snazzy little site. It’s a simple rails application that only uses the VC part of the MVC concept. No database is necessary. The application will display 3 columns. Top Goal Scorers by individual and team, and who’s playing next. When the cup is over, the third column will display the final match results and the World Cup Winner. As you would expect, the page will change as goal counts and matches proceed with the API changes.


Since I’m getting on the Cloud Foundry bandwagon, that’s where I wanted to deploy it. With a simple cf push –command ‘bundle exec rails s -p $PORT’ I had my webapp running at


The updated code is all available on Github at


Here are the only two bits of interesting code if you’re wondering how it’s all done:



Originally Posted on

Comments are closed.