Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Example template seems broken #938

Closed
engineer-plus-plus opened this issue May 15, 2020 · 4 comments
Closed

Example template seems broken #938

engineer-plus-plus opened this issue May 15, 2020 · 4 comments

Comments

@engineer-plus-plus
Copy link

engineer-plus-plus commented May 15, 2020

I am trying to run the template form the README like this: rails new searchapp --skip --skip-bundle --template https://raw.github.com/elastic/elasticsearch-rails/master/elasticsearch-rails/lib/rails/templates/01-basic.rb

There are couple if issues.

  1. Contrary to the README, it didn't install elasticsearch. Instead, it told me to start elasticsearch using docker like this docker run --name elasticsearch-rails-searchapp --publish 9200:9200 --env "discovery.type=single-node" --env "cluster.name=elasticsearch-rails" --env "cluster.routing.allocation.disk.threshold_enabled=false" --rm docker.elastic.co/elasticsearch/elasticsearch-oss:6.4.0
  2. So I started docker, rand the image as instructed, then ran the command to generate the example template. That failed with this error: Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Rejecting mapping update to [articles] as the final mapping would have more than 1 type: [_doc, properties]"}],"type":"illegal_argument_exception","reason":"Rejecting mapping update to [articles] as the final mapping would have more than 1 type: [_doc, properties]"},"status":400}
    I'm doing this in Bash on Macos 10.14,
@picandocodigo
Copy link
Member

Hi @engineer-plus-plus, thanks for reporting this. I'll take a look!

@picandocodigo
Copy link
Member

@engineer-plus-plus I've updated the README on #939. I think it was an issue with the version of Elasticsearch in the docker command. The change worked for me, but let me know if it fixes the issue for you too. Thanks!

@engineer-plus-plus
Copy link
Author

engineer-plus-plus commented May 15, 2020 via email

@picandocodigo
Copy link
Member

@engineer-plus-plus I updated the Pull Request to remove this. I'm going to take a look at the rest of the docs and templates to see where else we need updates. Let me know what you think, I'll merge the PR after you review it 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants