Skip to content

alanbuttars/chewy-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chewy Demo

The chewy gem is an excellent framework that enables simple integration with the equally fantastic elasticsearch-ruby gem.

This demo project is a simple demonstration of how the chewy gem can operate within a Rails project using a PostgreSQL.

Installation

These instructions are for Ubuntu 16.04 LTS, but will be roughly similar for other Linux distributions and Mac.

  1. Install RVM (https://rvm.io/rvm/install)
\curl -sSL https://get.rvm.io | bash -s stable --ruby
  1. Install PostgreSQL and create credentials (http://postgresguide.com/setup/install.html)
sudo apt-get update
sudo apt-get install postgresql postgresql-contrib libpq-dev

sudo -u postgres createuser -s chewy_demo
sudo -u postgres psql
\password chewy_demo
# Enter 'chewy_demo_password' at the prompt
\q
  1. Install elasticsearch (https://www.elastic.co/guide/en/elasticsearch/guide/master/running-elasticsearch.html)
curl -O "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.5.1.tar.gz"
tar -zxf elasticsearch-5.5.1.tar.gz
rm -f elasticsearch-5.5.1.tar.gz
sudo elasticsearch-5.5.1/bin/elasticsearch-plugin install analysis-phonetic
  1. Download code source
git clone https://github.com/alanbuttars/chewy-demo.git
  1. Register for a Google API Key
  • Go to the Google Developer Console
  • Login or register an account if you do not have one
  • Create a project
  • Create an API key
  • Enable the Google Maps JavaScript API for your API key
  1. Run the application
cd /path/to/chewy-demo
gem install bundler
bundle install

rake elasticsearch:go
rake db:go

GOOGLE_API_KEY=your-api-key rails server

About

Open-source project demonstrating the power of the Ruby chewy gem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published