Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Installation

Stephen Yeargin edited this page Jan 12, 2015 · 10 revisions

Pre-requisites

$ gem install bundler
$ npm install bower -g
$ brew install postgresql
  • An Amazon S3 bucket for ticket files

Install Steps

  1. Clone the repository into your projects directory
$ git clone git@github.com:seatshare/seatshare-rails /path/to/seatshare-rails`
  1. Install the required gems.
$ bundle install
  1. Install the required JavaScript assets.
$ bower install
  1. Create a .env file and add environment variables
$ cp .env-dist .env
$ vim .env
  1. Create a config/database.yml and add your PostgreSQL credentials if necessary.
$ cp config/database.yml.dist config/database.yml
$ vim config/database.yml
  1. Create the development and test databases and seed the initial data
$ rake db:setup
  1. Run the Rails server to bring up the application
$ rails server

Recommended: Run Guard

Guard is an automated live-reload and test runner. It saves you from accidentally breaking the build as well as simplifies local development by automatically refreshing your running browser when a file changes. It is installed as part of the default development bundle.

$ bundle exec guard

Optional: Run MailCatcher

MailCatcher is a useful tool for debugging email layout and deliverability issues. It runs by intercepting any outbound email from your development environment and sending it a web browser (typically available at http://localhost:1080/). If you provide set any value for the USE_MAILCATCHER environment variable, the application will route it accordingly. You will need to remember to start MailCatcher along with your application to use it.

$ gem install mailcatcher
$ mailcatcher

Environment Variables

You will use the Dotenv as explained in step 4 above to create a .env file for the required environment variables in local development. The following are used within the application:

  • ADMIN_API_KEY - Simple API key for allowing dashboard access
  • SEATSHARE_S3_KEY - S3 credentials to use for storing ticket files
  • SEATSHARE_S3_SECRET - S3 credentials to use for storing ticket files
  • SEATSHARE_S3_BUCKET - Bucket name to use for storing ticket files
  • SEATSHARE_S3_PUBLIC - Public address for S3 downloads
  • SIMPLE_FORM_API_TOKEN - The private API token for a Simple Form instance
  • SIMPLE_FORM_FORM_API_TOKEN - The public API token for a Simple Form instance
  • SODA_USERNAME - Username for SODA from XML Team
  • SODA_PASSWORD - Password for SODA from XML Team
  • SODA_ENVIRONMENT - Either development or production
  • TWILIO_ACCOUNT_SID - Account identifier for Twilio
  • TWILIO_AUTH_TOKEN - Authentication token for Twilio
  • TWILIO_OUTBOUND_NUMBER - Outbound phone number for Twilio

Development Only

  • USE_MAILCATCHER - If set to any value, emails are routed to MailCatcher in development

Production Only

  • MANDRILL_SMTP_USER - User identifier for Mandrill
  • MANDRILL_SMTP_PASS - API key for Mandrill
  • MANDRILL_SMTP_HOST - Hostname to use with Mandrill
  • GOOGLE_ANALYTICS_ID - Google Analytics profile identifier
  • MIXPANEL_API_KEY - API key for Mixpanel
Clone this wiki locally