Error loading file for custom synonym file in Elasticsearch

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

analysis:
  filter:        
    name_synonyms:
      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:

/root/workspace/project-project-0f317744a1870b4baf61bbaeb390ebe1/config/
synonyms/term_synonyms.txt

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

root@ip-XX-XXX-XX-XXX:~/workspace/project-project-
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
returned:
500 : {"error":"IndexCreationException[[test_colleagues] failed to create
index]; nested: FailedToResolveConfigException[Failed to resolve config
path
[/root/workspace/project-project-0f317744a1870b4baf61bbaeb390ebe1/config/synonyms/term_synonyms.txt],
tried file path
[/root/workspace/project-project-0f317744a1870b4baf61bbaeb390ebe1/config/synonyms/term_synonyms.txt],
path file
[/etc/elasticsearch/root/workspace/project-project-0f317744a1870b4baf61bbaeb390ebe1/config/synonyms/term_synonyms.txt],
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.