I am trying to import ailments.csv to work on Heroku and its just not wanting to work properly. I have searched and searched with no real solutions.
Locally it is working fine and the ailments show.
Here is the Heroku app link so you can see what I'm having issues with.
HOW TO GET TO AILMENTS:
-Click on "check your address"
-Enter 202 tryon st for address, and 28207 for zip code (This is within our service area)
-There will be a dropdown that says select your ailment. And you can see its blank. It should be displaying the ailments within the csv file.
LINK TO GITHUB REPO:
Its too much code to post on here so it will be easier for you to see how I've done things on the github repo.
Import rake code
namespace :import_ailment do
desc "Import ailment from a CSV file"
task ailments: :environment do
CSV.foreach("ailments.csv") do |row|
name, description, shopping_list, price = row
Ailment.create(name: name, description: description, shopping_list: shopping_list, price: price)
Make sure you run the migration on Heroku with:
heroku run rake import_ailment:ailments