Requirements
-
rails v4.2.9
-
pg v0.20 (for rails 5 ‘~> 0.18’)
-
gmaps4rails
-
google API key developers.google.com/maps/documentation/javascript/get-api-key
Setup
-
rails generate model Polygon name:string polygons_list:text
-
add ‘serialize :polygons_list` in polygon.rb
-
rake db:create
-
rake db:migrate
Deploy on Heoku
-
heroku login
-
heroku create app_name –stack cedar
-
heroku addons:add heroku-postgresql:dev -a app_name
-
git push heroku master
-
heroku run rake db:migrate
-
heroku restart