magynhard/yaml_extend

undefined method `start_with?' for #<Pathname:0x00000006327430>

Closed this issue · 2 comments

Hi,

I've added the gem and followed the instructions, but I keep getting this error: undefined method `start_with?' for #Pathname:0x00000006327430

Method called: YAML.ext_load_file('/opt/config/test.yml')

Any ideas?

Thanks.

Details:
undefined method `start_with?' for #Pathname:0x00000006327430

/usr/local/rvm/gems/ruby-1.9.3-p551/gems/yaml_extend-1.1.1/lib/yaml_extend.rb:160:in `absolute_path?'

/usr/local/rvm/gems/ruby-1.9.3-p551/gems/yaml_extend-1.1.1/lib/yaml_extend.rb:142:in `make_absolute_path'

/usr/local/rvm/gems/ruby-1.9.3-p551/gems/yaml_extend-1.1.1/lib/yaml_extend.rb:107:in `ext_load_file_recursive'

/usr/local/rvm/gems/ruby-1.9.3-p551/gems/yaml_extend-1.1.1/lib/yaml_extend.rb:75:in `ext_load_file'

Hi @alexwilliamsdr, thank you for your feedback.

At first glance, it looks like it might be caused by your REALLY old Ruby version (1.9.3 - from 2014).

And it was, as i used caller_locations which was added at Ruby 2.1.10.
But fortunately i added a compatibility and just released it with yaml_extend 1.1.4

And you must have used a Pathname instead of a String for the yaml_file name.
So i added support for Pathname as well.

Can you please upgrade to 1.1.4 and give me feedback if it works fine at you as well?

@alexwilliamsdr did it work for you with the new version as told in my previous comment?