Installation

Before doing anything else, download the code, which can be done by running

git clone https://github.com/dmorrill10/acpc_poker_gui_client.git

Or by manually downloading a package from Github.

Vagrant (still experimental but potentially much easier. I recommend trying this first.)

Install Vagrant for your system and run vagrant up in the root directory of this project. This will download and boot a virtual machine, then install the necessary packages to be compatible with this project. Once the virtual machine has started successfully,

  1. ssh into it (see these instructions for more details on how to do this),
  2. clone this project again to your home directory (the share folder is unusably slow so either clone the project again from Github, or copy it from the shared /vagrant directory),
  3. run bundle install to install Ruby (gem) dependencies,
  4. run rbenv rehash to ensure gem binaries will be in your path,
  5. run script/solve_wrong_elf_class_for_hand_evaluator to fix an architecture class compilation problem,
  6. compile the ACPC dealer by running acpc_dealer compile, and
  7. ./script/start_dev_server to get the app running.

The app should then be served on http:localhost:3000.

Manual

Prerequisites

  • A compatible *NIX-based operating system. Has been successfully installed on Ubuntu variants (12.04 LTS is recommended, but both older and newer versions should work as wel), and Mac OS X Lion. Windows is not supported (in this case, it is recommended to use the Vagrant automatic virtual machine installation as described above, or manually run a compatible operating system as a virtual machine in VMWare Player or VirtualBox.
  • Ruby 2.0.0 - This can be installed in different ways, but a good choice is rbenv (recommended) or RVM. Or you can follow these instructions to install via a different method.
  • Git - While this should only be required if you want to install Ruby via rbenv or RVM, installing Git also makes working with this repository easier, so it is recommended. Follow these instructions to do so.
  • Bundler - Bundler is a Ruby gem that manages a project's gem dependencies. It requires zlib, which can be installed through package manager or RVM by running

    rvm pkg install zlib
    

    Once Ruby is installed, installing Bundler should only be a matter of running

    gem install bundler
    
  • A non-LLVM version of GCC - This may require some extra steps on OSX as some versions of XCode no longer include such compilers. There are many discussions on solutions for this on stack overflow.

  • Redis - Background process server. See these instructions for installation instructions.

  • JavaScript runtime such as Node.js, or add gem 'therubyracer' to the Gemfile (pure Ruby JS runtime; convenient, but inefficient).

  • For using the app, a modern browser (Google Chrome or Chromium tend to work best and are most thoroughly tested). Must support JavaScript and this must be enabled.

Installing the Project

After downloading the project, download a MongoDB version compatible with your system, unpack the compressed file to <project root>/vendor, and rename the resulting directory to mongoDB.

then, in the project's root directory, run

bundle install
bundle exec rake install:dev

This should install most of the application's dependencies, except Apache, including gems and Redis, and will complete the MongoDB setup.

Run script/start_dev_server and point a browser to http:localhost:3000 to check that installation was successful.