Error loading file for custom synonym file in Elasticsearch

I am using Rails, Tire and Elasticsearch on EC2. With a custom initializer
as such:

      type: synonym
      synonyms_path: <%= Rails.root.join("config", "synonyms", 

"name_synonyms.txt") %>

This file run thru Erubis and the synonyms path is converted to something
like this:


When I list the files in the sever I see the following:

0f317744a1870b4baf61bbaeb390ebe1/config/synonyms# ls -la
total 20
drwxr-xr-x 2 root root 4096 Feb 11 18:25 .
drwxr-xr-x 7 root root 4096 Feb 11 18:25 ..
-rw-r--r-- 1 root root 3117 Feb 11 18:25 location_synonyms.txt
-rw-r--r-- 1 root root 3999 Feb 11 18:25 name_synonyms.txt
-rw-r--r-- 1 root root 2144 Feb 11 18:25 term_synonyms.txt

Which is exactly I am expecting, however I see the following error when
running rake spec

[ERROR] There has been an error when creating the index -- elasticsearch
500 : {"error":"IndexCreationException[[test_colleagues] failed to create
index]; nested: FailedToResolveConfigException[Failed to resolve config
tried file path
path file
and classpath]; ","status":500}

It seems to me Elasticsearch is not capable of loading the files although
the path is correct, could be a load order issue, I am really not too sure.

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit