Skip to content
Keith Dahlby edited this page Feb 26, 2016 · 8 revisions

Running HuBoard Locally

Clone from the Active Development Repo

git clone git@github.com:huboard/huboard-web.git

General Dependencies

  1. Ruby 2.2.* (rvm use 2.2.1)
  2. Node.js 4.2.*
  3. VirtualBox (free) or VMware
  4. Vagrant

Install Vagrant Dependencies

gem install puppet
gem install librarian-puppet
librarian-puppet install

Setup Vagrant with a Virtual Machine

vagrant up

If you get a timeout error, there's probably a virtualization configuration error. The most common providers have a gui configuration option (VirtualBox, VMware) that you can add to our Vagrantfile, which may communicate errors that are not exposed in headless mode.

One common error is:

T-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.

Many PCs ship with "hardware virtualization" disabled. This can typically be resolved through a BIOS setting.

Connect to VM and install more dependencies

vagrant ssh
cd /srv/huboard
bundle install

Note: vagrant ssh requires that ssh be available, which is not true by default on Windows. If it's not available, you should get a helpful message with good advice:

ssh executable not found in any directories in the %PATH% variable. Is an SSH client installed? Try installing Cygwin, MinGW or Git, all of which contain an SSH client.

Register App for Github OAuth

Go to https://github.com/settings/applications -> Developer Applications -> Register new application to get the app keys needed for OAuth.

  • Homepage: http://localhost:3001
  • Callback: http://localhost:3001

Configure Your App

cp .env.example .env

Edit .env to set the Client ID and Client Secret provided by Github when you registered the application.

Setup Ember CLI

HuBoard uses Ember.js for its client side script. First, download and install Node.js. Then from the local machine (NOT the VM, ember-cli's watcher can't seem to keep up with the VM's file changes):

# Install bower in project root
npm install

# Install ember-specific dependencies
cd ember-app
npm install ember-cli -g
npm install
ember build

##Start the Server

vagrant ssh
cd /srv/huboard
bundle exec rails s -b 0.0.0.0

From your host you should now be able to connect to http://localhost:3001/ and login with GitHub. You should be asked to grant permissions to the OAuth Application you created earlier.

Developing with Ember

While working you can start the ember watcher (typically in a separate terminal window) so that it recompiles the client code on file change.

cd ember-app
ember build --watch