0

I'm following "Ruby on Rails" to set-up my Bonsai Elastic Search Heroku add-on, but the FORCE flag is not working.

Here's the command from the instructions:

heroku run rake environment elasticsearch:import:model CLASS='Company' FORCE=yes

And here's the error message:

ArgumentError: companies does not exist to be imported into. Use create_index! or the :force option to create it.

What am I doing wrong? Should I use :force instead of FORCE?

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Bago Camembert
  • 103
  • 1
  • 10
  • Strange, FORCE=yes should have worked. Relevant Ruby code here: https://github.com/elastic/elasticsearch-rails/blob/master/elasticsearch-rails/lib/elasticsearch/rails/tasks/import.rb#L63 – Nick Zadrozny Oct 29 '16 at 22:51

1 Answers1

0

The solution was to use curl to create the index. Something about heroku, possibly, doesn't allow the standard command to work.

For users, you would do something like this: (replacing the username, password, and url....)

curl -XPUT http://username:password@redwood-12345.us-east-1.bonsai.io/users

Bago Camembert
  • 103
  • 1
  • 10