Skip to content

Latest commit

 

History

History
74 lines (54 loc) · 1.87 KB

CONTRIBUTE.md

File metadata and controls

74 lines (54 loc) · 1.87 KB

Contribute Guide

Requirements

  • Ruby 2.4.0 +
  • PostgreSQL 9.4 +
  • Redis 2.8 +
  • Elasticsearch 2.0 +

Install in development

Mac OS X, use Homebrew

$ brew install redis postgresql imagemagick gs elasticsearch

Ubuntu

$ sudo apt-get install postgresql postgresql-contrib redis-server imagemagick ghostscript libpq-dev

Install Elasticsearch

curl -sSL https://git.io/vVHhm | bash
$ git clone https://github.com/ruby-china/homeland.git
$ cd homeland
$ ./bin/setup
Checking Package Dependencies...
--------------------------------------------------------------------------------
Redis 2.0+                                                                 [Yes]
Memcached 1.4+                                                             [Yes]
ImageMagick 6.5+                                                           [Yes]
--------------------------------------------------------------------------------

Installing dependencies
--------------------------------------------------------------------------------
The Gemfile's dependencies are satisfied
--------------------------------------------------------------------------------

Configure
--------------------------------------------------------------------------------
Your Redis host (default: 127.0.0.1:6379):
Your Elasticsearch host (default: 127.0.0.1:9200):
--------------------------------------------------------------------------------

Seed default data...                                                      [Done]

== Removing old logs and tempfiles ==

Homeland Successfully Installed.

$ rails s

Testing

bundle exec rake

Reindex ElasticSearch

rails environment elasticsearch:import:model CLASS=Page FORCE=y
rails environment elasticsearch:import:model CLASS=Topic FORCE=y
rails environment elasticsearch:import:model CLASS=User FORCE=y