2
尝试在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