A one-file Sinatra voting app that would fit in a gist, suitable for teaching Ruby web-development basics.
Clone this repository and run bundle
or just
gem install sinatra
, the sole dependency.
Start the application with ruby suffragist.rb
.
Visit localhost:4567 to cast your first vote.
If you want to have automatic app reloading when you
edit the file you can gem install rerun
and start
the application with rerun suffragist.rb
instead.