Skip to content
Tim Fischbach edited this page Sep 9, 2016 · 8 revisions

This document describes the (arguably) easiest steps to start Pageflow on a development machine.

Disclaimer: The setup described here is in no way fit to be used in production.

Pageflow is a "Rails Engine" which means it is designed to be a part of a bigger Ruby on Rails application.

A Rails App with Pageflow requires a couple of additional applications and services:

  • A Database to store the presentations and user-accounts (MySQL).
  • Storage that will hold the Images, Videos and Audios used in the presentations (Amazon S3).
  • A Service to convert the Video and Audio-File in multiple formats for different devices and browsers (Zencoder).
  • A messaging system that allows these components to communicate (Redis + Resque).

Please, note that using Zencoder and AWS will result in fees. Right now there are no alternatives to using S3 and Zencoder with Pageflow without strongly reducing the feature-set.

Get the Requirements

Get accounts for

Install the following components:

Install Pageflow

Start a New Rails App

Now create a new rails application that will contain Pageflow. The name pretty_reports can be substituted by another name. (Just don`t use "Pageflow" -> Troubleshooting#do-not-call-your-generated-application-pageflow). Pageflow will be the only component in this example-application.

# rails _4.2.7.1_ new pretty_reports --database=mysql
# cd pretty_reports

Setup Pageflow as described in the readme.

Configure Pageflow

  • Setup up a database user for Pageflow: Create a user using a database tool or by using mysql from the command-line. Here we're calling the database pretty_reports_development and the user myuser:

    # mysql
    
    mysql> create database pretty_reports_development;
    mysql> grant all privileges on pretty_reports_development.*
      to 'myuser'@'localhost' identified by 'myPassword11';
    mysql> FLUSH PRIVILEGES;
    mysql> EXIT;
    
  • Configure the database in config/database.yml The part marked with development should look like this:

    development:
      adapter: mysql2
      database: pretty_reports_development
      username: myuser
      password: myPassword11
      host: localhost
    
  • Configure the Storage (S3) and Encoding (Zencoder) Services as described in Setting up external services

Start Pageflow

Now, Pageflow should be ready to run on you development machine.

Make sure Redis is running

See the output of:

# ps aux | grep redis

If necessary start a Redis server:

# redis-server

This will start the redis-server on localhost port 6379. This should be configured accordingly in config/initializers/resque.rb

Start Resque

# rake resque:scheduler

Start a single resque worker to handle all background tasks:

# QUEUE=* rake resque:work

Start Rails

Start a Webserver running rails.

# rails s

Go to http://localhost:3000/admin/login and sign-in using the username [email protected] and the password !Pass123.