Permalink
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (65 sloc) 1.39 KB

General

Set up

rake db:create
rake db:migrate
rake db:test:prepare

rails s

Running Tests

Run can run all the tests in the suite with:

rake

or run just the ingtegration tests with:

rspec spec/integration

or a single test:

rspec spec/integration/application_spec.rb

Update single attribute from console..

set t to desired TeacherRecommendation
t.email="desired_email"
t.update_attribute('email',t.email)

Open and close system for submitting applications

Production:

heroku config:set REGISTRATION_OPEN='true' --app pgsapplication
heroku config:set REGISTRATION_OPEN='false' --app pgsapplication

Staging:

heroku config:set REGISTRATION_OPEN='true' --app application-staging
heroku config:set REGISTRATION_OPEN='false' --app application-staging

Development:

export REGISTRATION_OPEN='true'
export REGISTRATION_OPEN='false'

Drop staging database

Find Database Name

heroku addons --app application-staging | grep POSTGRES

Drop Database

heroku pg:reset HEROKU_POSTGRESQL_ORANGE --confirm application-staging

Migrate

heroku run rake db:migrate --app application-staging

Seed

heroku run rake db:seed --app application-staging

Populate w/ fake data

heroku run rake db:populate --app application-staging

update ruby on heroku