Installation - PushType Docs


(Aaron Russell) #1

This tutorial will guide you through the simple process of installing PushType in to your Rails application.

Dependencies

PushType takes advantage of modern features of PostgreSQL, which in turn requires a recent version of Rails.

  • Rails 4.2+
  • PostgreSQL 9.4
  • ImageMagick

Installation

Assuming you have a Rails app ready to go, add the following line to the Gemfile:

gem 'push_type'

Then execute from the terminal:

bundle install

Once bundler has done its thing, you’ll be able to use PushType’s Rails generators. Execute from the terminal:

rails g push_type:install

That will install a configuration file in config/initializers, setup some rules is config/routes.rb, and migrate your database.

Finally, from the terminal run this rake task to create a user with which you’ll be able to log in to PushType:

rake push_type:create_user

What next?

I’m guessing that didn’t even take five minutes, right?

At this point, you can fire up your application and start poking around in the admin UI:

http://localhost:3000/push_type

However, you won’t be able to create any content yet. You need to start generating node types.


This is a companion discussion topic for the original entry at http://www.pushtype.org/docs/installation

(Prussiap) #2

Hey,
Well it’s not that i didn’t figure it out and assume correctly but the doc section on teh bottom that said /admin for the ui. It’s changed here but not on the doc page as far as I can tell.

I went through setup and went to push_type but then realized admin didn’t really exist after checking here.

Thanks again for the info and site.


(Aaron Russell) #3

Sorted :thumbsup: These posts don’t get automatically updated if changes get made to the documentation site - it needs a manual kick.


(Will) #4

I’ve got to the final step and failed. It just hangs on “rake push_type:create_user” with no output. any clues?


(Will) #5

Just looking at that rake task (https://github.com/pushtype/push_type/blob/7add8229a73c6d0c5806edbed5169cd0c15c0a12/auth/lib/tasks/push_type_tasks.rake)

It hasn’t got anything fancy like adding PG extensions like some of the migrations, but it does use “ask” to ask questions in terminal. Neat, I’ve not seen that before : )

It doesn’t get to ask me anything though. I guess that’s why it’s hanging.

UPDATE

I tried just typing my name, to see if the prompts were missing but it would work - that seemed to wake it up and it started asking the questions.

After that, /admin gave an error, but /push_type (lucky guess!) worked. Yay.


(Aaron Russell) #6

@asecondwill I’m guessing the issues you had are related to the old version you were trying previously?

https://discuss.pushtype.org/t/assorted-problems-possibly-im-following-the-wrong-or-outdated-docs/229

The output issue with the rake task sounds weird though. Do you still have this problem with the latest PushType?


(Will) #7

hi @aaron - no. it was all self inflicted by having rails 4.1. I upgraded to 5 and all good.