No handler found for uri [/ModelName] and method [POST]

Viewed 5201

Trying to deploy rails app on heroku production with Elasticsearch and Tire. Heroku bonsai addon is added but still after running this command

heroku run rake environment tire:import CLASS=Property FORCE=true

getting error:

400 : No handler found for uri [/properties] and method [POST]

Please help to debug this error?

this is my property model:

class Property < ApplicationRecord
 include Tire::Model::Search
 include Tire::Model::Callbacks

  mapping do
   indexes :id, type: 'integer'
   indexes :country
   indexes :city
   indexes :province
   indexes :holding_type
   indexes :price, boost: 10
  indexes :created_at, type: 'date'
 end
end

this is my bonsai configuration config/initializers/bonsai.rb

ENV['ELASTICSEARCH_URL'] = ENV['BONSAI_URL']
1 Answers
Related