HiGrit is a blogging engine built on ruby on rails platform with postgres database to organize and simplify legal search services.
Demo : http://infinite-earth-9525.herokuapp.com/
- tags (or categories)
- nested comments (reply) closure_tree gem
- Upvote/Downvote Ajax in Rails : responders gem
- pretty urls : friendly_id gem
- Text Mining Related queries using Inverse Document Frequency(tf-idf) : nokogiri & htmlentities gem
- integrated bootstrap in rails : bootstrap-sass gem
- multiple users
- Post a Free Query : Post your free online legal query with us.
- Search for Lawyers : Find best lawyers in your nearby location.
- Get Instant Answers : Lawyers from various domains will get back to you in a while.
- Search Queries Tag-wise and Rate : Get all the categorised answers and rate the queries and answers
- Admin Panel for moderation
- Install ruby rubyinstaller-2.2.3-x64.exe
- Install rails on cmd prompt :
gem install rails
- check version
rails -v
ruby -v
- Install devkit DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
- Download and Install postgresql-9.4.5-3-windows-x64.exe
- set password of postgres user : root
- change data cluster path to other Disk except C:\ eg. F:\data (in case of cluster error)
- Open psql Shell :
i. Press Enter to continue with default user(postgres) and port 5432
ii. Create New SuperUser for Project
postgres=# CREATE ROLE rubyuser LOGIN ENCRYPTED PASSWORD 'md57c9aeb504d6af71fa00e37ca8336a466' SUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;
postgres=# \password rubyuser
iii. Install postgres adapter in cmd prompt
gem install pg
gem install activerecord-postgresql-adapter
iv. Open psql and login with postgres user
postgres=# CREATE DATABASE higrit_development OWNER rubyuser;
postgres=# CREATE DATABASE higrit_test OWNER rubyuser;
postgres=# CREATE DATABASE higrit_production OWNER rubyuser;
- \l : show databases
- \c library_development : connect database_name
- \dt : show tables
- \d+ tablename : show table description
-
Navigate to devkit folder in c: drive
-
Open Git Bash there and execute :
git clone https://github.com/aqfaridi/higrit-legal-advisor.git
OR Download zip github repository and simply extract it to devkit folder
-
Open config/database.yml file
change development:
development: adapter: postgresql encoding: unicode database: higrit_development username: rubyuser password: root
database => name of database in postgres you want to use for development
username => owner of the database
- You can create different database, open psql :
postgres=# CREATE DATABASE <database_name> OWNER <username>;
-
Open cmd prompt in project folder , run bundle to install required gems and Migration to create Tables in db
bundle install rake db:migrate
-
Run server
rails s
-
Open Browser and put url
localhost:3000
Here you go !! signup the new user , sign in and create blog .. Enjoy :)
Open cmd prompt in project folder to open rails console
rails c
Category.create(name:"Divorce")
Category.create(name:"Crime")
and so on to add categories of legal queries