ankane / distribute_reads

Scale database reads to replicas in Rails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

global_methods.rb:3: syntax error, unexpected tLABEL, expecting ')' (SyntaxError)

snowbyte opened this issue · comments

I am running Rails 3.2.11. I checked the documentation to see if distribute_reads supports this version of rails but I didn't see anything. So I installed distribute_reads 0.2.4 and makara 0.4.0.

I get the following error:

.rvm/gems/ruby-1.9.3-p392/gems/distribute_reads-0.2.0/lib/distribute_reads.rb:22: syntax error, unexpected tLABEL, expecting ')' (SyntaxError)
def self.lag(connection: nil)
^
.rvm/gems/distribute_reads-0.2.0/lib/distribute_reads.rb:52: syntax error, unexpected keyword_end, expecting $end

I looked at the code and nothing stood out. I am just assuming that it is due to Rails 3.2.11 but was hoping for some confimation.

Thanks

Jun

Hey @snowbyte, Distribute Reads requires Ruby 2.2+. I just updated the gemspec to make this more clear.

That's too bad. Thank you for the quick response.