Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 1.9 KB

CONTRIBUTE.md

File metadata and controls

75 lines (55 loc) · 1.9 KB

Contribute Guide

Requirements

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

Install in development

Mac OS X, use Homebrew

$ brew install memcached redis postgresql imagemagick gs elasticsearch

Ubuntu

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

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