Make a todo list web app in Ruby

Instructions for getting set up for the workshop on Windows

Download starting point View on GitHub

Install a Text Editor for writing code

If you don't already have it installed, download Sublime Text. If you've used Atom or TextMate before those can be used too.

Get set up for the workshop

Follow the steps in the screencast video below or see the written notes underneath.

Note: there have been updated versions of Ruby since the screencast was recorded. The links below will let you download the current version.

Download RubyInstaller and Development Kit

For 32-bit Windows:

For 64-bit Windows:

If unsure which you need, use the 32-bit versions.

Run RubyInstaller Setup

Run the downloaded rubyinstaller, follow the steps:

  1. Select the language to use during the installation
  2. Accept the licence agreement
  3. Choose destination and optional tasks (be sure to tick Add Ruby executables to your PATH)
  4. click Finish

Install Development Kit

Run the downloaded DevKit exe:

  1. Enter a folder to extract the files e.g. C:\RubyDevKit, click Extract
  2. Open a Command Prompt
  3. CD into the folder where the files were extracted e.g. cd \RubyDevKit
  4. Run the commands:
    ruby dk.rb init
    ruby dk.rb review
    ruby dk.rb install

See Wiki for more details: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

Install Bundler

  1. While still in the Command Prompt run the command gem install bundler
  2. click Allow access if prompted by Windows Firewall

Download the code for the workshop

  1. Download the starting point code: https://github.com/mikej/ruby_todo/archive/v0.4.zip
  2. Go to the Downloads folder in Windows Explorer and unzip the downloaded code by right-clicking on the zip file and clicking Extract All
  3. Once it has finished extracting, Windows should display the new folder with the contents of the zip file. This should contain a single sub-folder ruby_todo-0.4
  4. Drag this ruby_todo-0.4 sub-folder into the Documents folder
  5. Open the Documents folder and rename ruby_todo-0.4 to the shorter ruby_todo
  6. Switch back to the Command Prompt and change to the folder where the code has been copied e.g. cd \Users\mike\Documents\ruby_todo (replacing "mike" with your username in Windows)
  7. Once in the ruby_todo folder run the command: bundle install
  8. Download SQLite files:
  9. Go to the Downloads folder in Windows Explorer and copy the contents of the 2 sqlite zip files into the \Ruby21\bin folder

Test it!

  1. Switch back to the Command Prompt which should still be in the ruby_todo folder and run the command rackup, this will start the web server for the app
  2. With the web server running go to the address localhost:9292 and you should see a web page saying Sinatra doesn't know this ditty, this tells us that the app is ready but that it dosen't have any pages yet

If you get this far then everything is ready to go!