prashaantt / savitri

Savitri
savitri.in
1 stars 0 forks source link

Savitri Developer Install Guide

This guide is aimed at advanced Rails developers who have installed their own Rails apps before.

First Steps

  1. Install and configure PostgreSQL 9.1+.
    1. Run postgres -V to see if you already have it.
    2. Make sure that psql command exists as we use this in seed.rb
    3. Make sure that the server's messages language is English; this is required by the ActiveRecord Postgres adapter.
  2. Install and configure Redis 2+.
    1. Run redis-server -v to see if you already have it.
  3. Install ImageMagick
  4. Install rvm with Ruby 1.9.3-p484 and Bundler.
  5. Clone the project and bundle.
  6. create config/application.yml from config/application.yml.sample and add all keys. To generate secret token you can use rake secret
  7. create config/database.yml from config/database.yml.sample.

Before you start Rails

  1. bundle install
  2. bundle exec rake sunspot:solr:start
  3. bundle exec rake db:create db:migrate
  4. bundle exec rake admin:create
  5. bundle exec rake db:seed
  6. bundle exec rails server

Solr indexing and troubleshooting

  1. Run rake task bundle exec rake sunspot:solr:index to index your data in solr. It will take time for indexing as database is huge.
  2. If any errors while indexing try to remove all index, stop solr and reindex again. SO answer

You should now be able to connect to rails on http://localhost:3000 - try it out!