rbevers / em_app

A Ruby on Rails app sketch for demonstrating some user stories.
https://fierce-inlet-8316.herokuapp.com
0 stars 0 forks source link

== README

Welcome to the EM App.

It demonstrates skills with Ruby on Rails, AngularJS, OAuth, and other miscellanea.

=== Running locally

==== 1. Node.js is required for JavaScript support.

Make sure you have Node.js installed to enable JavaScript goodies.

http://nodejs.org/download/

==== 2. Bower is used for JavaScript dependency management.

Next, ensure that Bower is installed to enable the bower-rails gem to make JavaScript & Ruby on Rails play nice together.

npm install bower -g

==== 3. Ruby 2.1.3 is required.

You'll need to have a compatible version of Ruby installed. If you don't have Ruby 2.1.3 or don't use RVM you'll need to figure this step out yourself.

I use rvm like so.

rvm install 2.1.3

NOTE: If you don't have a recent version of RVM, it won't auto-detect the right Ruby version from the Gemfile. Best to get the latest stable.

==== 4. Get all the necessary gems using Bundler.

Install all the sundry gems required using Bundler.

bundle install

==== 5. Setup PostgreSQL database for Rails.

I use Postgres.app, which can be acquired here: http://postgresapp.com

After it is installed and running, click on the elephant and choose "Open psql". Inside of psql you can add the required user by running the provided script using the following command (replace with the actual local path to your cloned code).

\i /db/create-em_app-user.sql

This will add the +em_app+ user to your PostgreSQL server which is the account under which the app database is created and accessed.

==== 6. Setup the database with Rails data.

Run the Rake command to setup the database.

rake db:setup

==== 7. Make sure the tests run.

Run the Railsy tests.

rake spec

Run the JavaScripty tests.

rake teaspoon

==== 8. Run the local server.

rails server

Open the URL: http://localhost:3000

==== 9. Log in

If you're in the system seed data you can log in with your email and the password easyToRemember.