Following error occurs after adding a new language xx.
Showing vendor/plugins/tolk/app/views/tolk/locales/index.html.erb where line #10 raised:
undefined method `count' for :Array
Extracted source (around line #10):
7: <% @locales.each do |locale| %>
9: <%= link_to locale.language_name, locale %>
10: <% missing_count = locale.count_phrases_without_translation %>
After adding the language file xx.yml and running rake tolk:sync the error changes to:
undefined method `count' for #Array:0x287b868
James Brennan commented on this type of error:
"You're probably seeing this error because ruby 1.8.7 introduced count as a method on Array, whereas it does not exist in 1.8.6. Chances are production is running 1.8.6 or earlier."
Thanks for the hint. I am using ruby 1.8.6. Is there an easy way to update to the current ruby version?
SUzB : Check RVM http://rvm.beginrescueend.com/
Upgrade from ruby 1.8.6 to 1.8.7 fixed it. Thanks!