A/Bingo Installation Instructions

This is the quickstart version of these instructions. You'll find somewhat more detail in the README file included with the plugin. A/Bingo is designed to install in under five minutes.

  1. Install the plugin:
    git clone git://git.bingocardcreator.com/abingo.git
        ---  or ---
    # In Rails 2
    script/plugin install git://git.bingocardcreator.com/abingo.git
    # In Rails 3
    rails plugin install git://git.bingocardcreator.com/abingo.git
  2. Create the required tables:
    # In Rails 2
    ruby script/generate abingo_migration
    rake db:migrate
    # In Rails 3
    rails generate abingo_migration
    rake db:migrate
  3. Assign the user a unique, long-lived identifying string (why):
    # In application.rb (Rails 2) or application_controller.rb (Rails 3)
    # This is sample code, the simplest that possibly works:
    before_filter :set_abingo_identity
    def set_abingo_identity
      if (session[:abingo_identity])
        Abingo.identity = session[:abingo_identity]
        session[:abingo_identity] = Abingo.identity = rand(10 ** 10).to_i
  4. Optional: Configure the cache, which should ideally be persistent (why). If you skip this, A/Bingo will use the Rails default cache. By default, Rails uses a MemoryStore cache in development and testing modes. Using this store with A/Bingo will cause A/Bingo to die with a "can't modify frozen array" exceptions when the user hits their second test if you are using Rails prior to version 2.3. This is due to a a bug in Rails which has subsequently been patched. Make sure you don't use the default MemoryStore cache!
    #This is my memcacheDB instance
    Abingo.cache = ActiveSupport::Cache::MemCacheStore.new("cache.example.com:12345")
  5. Optional: Install the dashboard. This will let you quickly see the results of your tests, or end them, through a web interface.
    #Create a new controller.  The name is up to you -- this example
    #uses abingo_dashboard_controller.rb
    class AbingoDashboardController < ApplicationController
      #Declare any before_filters or similar which you need to use your authentication
      #for this controller.
      include Abingo::Controller::Dashboard
    #You need to add the following to routes.rb: (Rails 2)
      map.connect "/abingo/", :controller=> "abingo_dashboard"
      map.connect "/abingo/end_experiment/:id", :controller => "abingo_dashboard", :action => "end_experiment"
    #For Rails 3:
      get 'abingo/', :to => 'abingo_dashboard#index'
      post 'abingo/end_experiment/:id', :to => 'abingo_dashboard#end_experiment'
    #Now, simply navigate to http://www.example.com/abingo and you'll see your dashboard.
    #The templates can be customized to your liking in plugins/abingo/views.