Skip to content

Project Setup in OSX

Santiago Palladino edited this page Sep 1, 2015 · 1 revision

In order to start developing Verboice on an OSX machine, you need to install the following prerequisites.

Developer Tools

You need to have installed the latest version of the xcode developer tools:

xcode-select --install

Homebrew packages

LibYAML

brew install libyaml

SOX

brew install sox

Asterisk

brew install asterisk

Languages

Verboice web interface is written in Ruby 1.9.3-p550, while the backend broker is written in Erlang 17. We suggest manage the Ruby installation using rbenv or rvm, and install erlang directly using homebrew.

Databases

Verboice uses MySQL as backend storage. Install it using homebrew and ensure it is running when starting the application.

Poirot

Optionally, if you choose to run Poirot for logging, you will also need to install ElasticSearch and ZeroMQ:

brew tap homebrew/versions
brew install homebrew/versions/zeromq3
brew install elasticsearch

Broker config

Make sure to update settings asterisk_config_dir and asterisk_sounds_dir in broker/verboice.config to match the paths where Asterisk was installed. If you installed it using homebrew, they should be:

{asterisk_config_dir, "/usr/local/etc/asterisk"},
{asterisk_sounds_dir, "/usr/local/opt/asterisk/var/lib/asterisk/sounds/"},

Set up web app

Install web app dependencies by running bundle install in the Verboice folder.

Set up database

To set up the database, run bundle exec rake db:setup as in a regular Rails project.

Run broker

To run the broker, simply cd into the broker directory, run make to compile, and make run to run the project. Make sure you have already set up the database before starting the broker, and that asterisk is running.

Run web app

To run the web app, run bundle exec rails s to start the Rails application in port 3000.