Reputation: 338
I have a problem using the rubygem for elasticsearch
When I try to execute the following code :
#!/usr/bin/env ruby
require 'rubygems'
require 'elasticsearch'
client = Elasticsearch::Client.new log: true
I get the following error :
syntax error, unexpected ':', expecting $end
client = Elasticsearch::Client.new log: true
^
Any ideas about this ?
Thanks
Upvotes: 0
Views: 87
Reputation: 51171
You seem to use Ruby prior to 1.9 version. If so, either update Ruby (which is recommended), or use old rocket-hash syntax:
client = Elasticsearch.new :log => true
Upvotes: 1