ElasticsearchとTireを使用してherokuプロダクションにrailsアプリケーションをデプロイしようとしています。 Herokuの盆栽アドオンを追加し、それでもエラーを取得し、このコマンドをuri [/ ModelName]とメソッド[POST]のハンドラが見つかりません
heroku run rake environment tire:import CLASS=Property FORCE=true
を実行した後にされています
400 : No handler found for uri [/properties] and method [POST]
このエラーをデバッグするために助けてください?
これは私の財産モデルです:
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
これは私の盆栽のコンフィギュレーションの設定/初期化子です/ bonsai.rb
ENV['ELASTICSEARCH_URL'] = ENV['BONSAI_URL']
$ curl -XPUT localhost:9200/properties- worksであるべきだと思います! – webber
はい、インデックスを作成します – xeraa