Skip to content
No description, website, or topics provided.
Ruby HTML Gherkin CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
bin
config
db
features
iterations
lib
log
public
script
spec
vendor/assets
.gitignore
.rspec
.travis.yml
Gemfile
Gemfile.lock
LICENSE.txt
README.md
README.rdoc
Rakefile
config.ru

README.md

Calumni: Student-Alumni-Network-App

Maintainability

Test Coverage

Build Status

Instructions for environment setup

  • Development

    • It is recommended to deploy this project locally instead of on cloud9, as elasticsearch cost much memory and you may not have access to port 9200 on cloud9.
    • bundle install --without production
    • rake db:migrate
    • rake db:seed
    • export GOOGLE_CLIENT_ID=xxx
    • export GOOGLE_CLIENT_SECRET=xxx
  • Testing:

    • rake db:seed RAILS_ENV=test --trace
  • Production:

    • heroku
      • setup environment variable for aws
      • setup environment for elasticsearch
  • Search feature

    • We use gem Searchkick to implement search function, while Searchkick supports the complete Elasticsearch Search API. You have to install elasticsearch before you can use searchkick.
    • ElasticSearch Installation
      • Installation, currently using 5.6.4
      • For macOS user, use brew
        • brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/3f9a5fc50e42f6bdd17f955419c299653a0f65b9/Formula/elasticsearch.rb
      • use curl -XGET 'localhost:9200/?pretty' to make sure you have start elasticsearch service
    • use 'rake searchkick:reindex CLASS=People' to build the index
    • use People.search("xxx" ,autocomplete:true,fields:[:username,:company]).map{|u| {username:u.username,company: u.company}} to make sure your searchkick works
    • deploy to heroku
      • activate one of the elasticsearch provider like bonsai
      • connect searchkick with bonsai
        • heroku config:set ELASTICSEARCH_URL=heroku config:get BONSAI_URL
      • heroku run rake searchkick:reindex CLASS=People
      • heroku run rake db:migrate
  • Image/file upload

    • We use gem paperclip to support image upload and store them locally in development mode.
      • run sudo apt-get install imagemagick to install related library.
    • On heroku, we store images/files on AWS s3.
    • Setup AWS
      • create an s3 bucket

      • setup environment variable for AWS

         heroku config:set S3_BUCKET_NAME=project_name
         heroku config:set AWS_ACCESS_KEY_ID=key_id
         heroku config:set AWS_SECRET_ACCESS_KEY=key
         heroku config:set AWS_REGION=region
        
You can’t perform that action at this time.