I have a bestiary.yml and test.rb in one directory, and when I try loading my .yml file like that
got_data_1 = YAML.load_file('bestiary.yml')
it gives me a
/usr/lib/ruby/2.3.0/psych.rb:471:in `initialize': No such file or directory @ rb_sysopen
error. But when I try launching this
got_data = YAML.load(File.open(File.join(File.dirname(__FILE__), 'bestiary.yml')))
everything works fine. Why load_file method doesn't work and what's the difference between this two methods? Thank you