Closed oshmyrko closed 9 years ago
Hi @oshmyrko , good find! Looks like we either need to stop supporting Ruby 1.9, require Ruby 2.0, or fix this for backward compatibility with Ruby 1.9. I guess we should fix this to support Ruby 1.9. @temujin9 Any thoughts/preference on this? I don't think there's anything else that is incompatible with Ruby 1.9 ...
Let's keep Ruby 1.9 compatibility, at least for as long as it's simple to do so.
Created #61 for this issue. @temujin9 care to take a quick look for me? Thanks.
Hi @jonaf, I'm not well familiar with Ruby, but I have one more question. Should this line also be changed - validate_params: false? Seems this error is caused by that line:
/var/lib/gems/1.9.1/gems/cloudformation-ruby-dsl-1.0.3/lib/cloudformation-ruby-dsl/cfntemplate.rb:52: syntax error, unexpected keyword_end, expecting $end
from ./logstash.rb:4:in `<main>'
Thanks!
@oshmyrko I didn't get this error in Ruby 1.9.3-p551_1. What version of Ruby are you running? This error is due to the trailing comma, which is a preferred code style and acceptable in most places in most versions of Ruby (apparently, 1.9.1 doesn't like the trailing comma in method parameters?).
I'm using Ruby 1.9.3p484:
$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
$ gem which cloudformation-ruby-dsl
/var/lib/gems/1.9.1/gems/cloudformation-ruby-dsl-1.0.3/lib/cloudformation-ruby-dsl.rb
That's odd ... Why does gem
indicate you have cloudformation-ruby-dsl
installed for ruby 1.9.1, but your version of Ruby is 1.9.3?
Found this - Why are we installing Ruby 1.9.2/1.9.3 gems into a 1.9.1 folder?, and this.
In Ruby 1.9.0, the C interface was changed from the Ruby 1.8 series.
Gems that compile to native code had to be recompiled.
The interface was again changed in Ruby 1.9.1 and kept the same in Ruby 1.9.2 & 3. This explains the 1.9.1 you are seeing in your path.
Seems it is normal.
Thank you @jonaf, it is working now.
In this commit you've added new method and variable with keyword argument:
but keyword arguments work only with Ruby 2.0. Does it mean that we should use cloudformation-ruby-dsl with Ruby 2.0 or it's just a mistake?
Thanks!