Skip to content

Practice Importer

ahay-agile6 edited this page Mar 29, 2019 · 2 revisions

How the Practice Importer works

  1. Download survey results from Survey Monkey, or, make an excel spreadsheet with the same format as Survey Monkey
  1. Run the rake task: rails dm:full_import - this sets up the practice data using the full flow of the importer
  • the importer is broken down into two parts:
    • surveymonkey: used to download the files from survey monkey that were used as answers to some of the survey questions
      • uses mechanize to automagically download files into the tmp folder of the application
    • importer: does the bulk importing of practices into the database according to our schema

bulk importer notes


If you are getting an ssl cert error similar to this: Errno::ECONNRESET: Connection reset by peer - SSL_connect

  • if you have rvm installed run: rvm osx-ssl-certs update all
  • no rvm?
cert_file="$( openssl version -d | awk -F'"' '{print $2}' )/cert.pem"
mkdir -p "${cert_file%/*}"
security find-certificate -a -p /Library/Keychains/System.keychain > "$cert_file"
security find-certificate -a -p /System/Library/Keychains/SystemRootCertificates.keychain >> "$cert_file"

source: https://www.engineyard.com/blog/ruby-ssl-error-certificate-verify-failed

Clone this wiki locally