Middleman gives me error whenever i try to include yaml file in data

News

    <% data.newsdata.no_class.each do |item| %>
  • <%= "article: #{item}" %>
  • <% end %>

this is my news.html.erb file. The error i get is this

NoMethodError at /news.html
undefined method `newsdata’ for #Middleman::CoreExtensions::Data::DataStore:0x0000560c93329218
Ruby /home/keb/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/middleman-core-4.3.5/lib/middleman-core/core_extensions/data.rb: in method_missing, line 178
Web GET 192.168.1.183/news.html

any idea why?

Do you have a newsdata.yml file in the /data folder in your project? Generally this error undefined method xxx for a data.xxx call means the file xxx is missing (or is empty? or is invalid YAML?).