lundi 19 février 2018

undefined method `[]' for nil:NilClass(path)

I am beginner in Ruby who's looking to debug an issue in my "index" view. I am trying to list out different values for dataset. However, I am not sure where the issue lies in the following line of code.

 <% @datasets.each do |dataset| %>
   <%= Dir[File.join(dataset.ds.path[0,dataset.ds.path.to_s.length-4], '**', '*')].count
  <% end %>

Aucun commentaire:

Enregistrer un commentaire