Getting The Sample Code
You can find sample code at GitHub: https://github.com/spajus/ruby-gamedev-book-examples.
Clone it to a convenient location:
$ cd ~/gamedev
$ git clone git@github.com:spajus/ruby-gamedev-book-examples.git
Complete source code for the game that was built while writing this book is also available on GitHub. TODO add links when they are available.