Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
77 lines (62 sloc) 3.26 KB

README

creating and searching for events does not currently work in the deployed Heroku version, because the sunspot solr gem (which we use for searching in the app) requires a paid Heroku add-on (Websolr) to work. However, everything works well if you run the app locally.

SYSTEM REQUIREMENTS:

  • imagemagick

  • psql

TO RUN LOCALLY:

  • have config/local_env.yml with the following in it: S3_BUCKET_NAME: 'yourbucketname' AWS_ACCESS_KEY_ID: 'your_access_key_id' AWS_SECRET_ACCESS_KEY: 'your_secret_access_key' AWS_REGION: 'your_aws_region'

  • run these from the root of the app:

    • (NOTE: Any time `rake` is used, you may need `bin/rake`)

    • rake db:migrate (only needed if your database isn't up to date)

    • rake sunspot:solr:start

      • rake sunspot:reindex

        • do this any time after changing a “searchable” definition for a model

    • rails s

FOR DEPLOYING:

  • heroku addons:create websolr

  • add the following to the heroku config (see devcenter.heroku.com/articles/paperclip-s3): $ heroku config:set S3_BUCKET_NAME=your_bucket_name $ heroku config:set AWS_ACCESS_KEY_ID=your_access_key_id $ heroku config:set AWS_SECRET_ACCESS_KEY=your_secret_access_key $ heroku config:set AWS_REGION=your_aws_region

  • add the following for static files to be served unless/until Apache or NGINX takes care of it for us. $ heroku config:set RAILS_SERVE_STATIC_FILES=true

  • before committing and pushing to heroku: $ bin/rake assets:precompile

    • and be sure to point to static assets using AssetTagHelpers like image_tag, javascript_include_tag, and stylesheet_link_tag rather than putting them straight into the html with html tags! Something like the following will not work in production! : <!– <img src=“/assets/Middlebury_Panthers_logo.png” alt=“Mountain View” style=“width:175px;height:75px;”> –>

TODO:

  • confirm that user wants to leave the page if they've entered text w/o submitting a form and want to exit/go back/take a link away from the page

  • make pages responsive (so they look nice on any size page)

  • use sunspot (solr) to enable matching substrings in fulltext search

  • make it so a given user can't have two open sessions at once (i.e. be logged in in two places at once)

  • in user 'show' view (i.e. user profile), grey out events in the past

  • password recovery

  • email confirmation/validation upon creating a new account

  • replace panther at top of page with CampusEvents logo

TODO FOR DEPLOYMENT:

  • get solr working on heroku – or switch to Bonsai with Elastic Search because websolr is $20/month minimum.

    * http://stackoverflow.com/questions/19674619/heroku-rails-websolr-sunspot-is-not-free-in-production
    * https://devcenter.heroku.com/articles/websolr#sunspot-for-ruby-on-rails
  • Explicitly declare how to boot our server process via a Procfile.