Rails gem localized_country_select undefined method

I am trying to use the gem mentioned in the caption to post a dropdown with all countries on a user creation form. I wrote gem 'localized_country_select', '> = 0.9.9' in the GemFile and did the package installation. After that, I updated the view of the user form with the following code:

</div>
<div class="field">
<%= f.label :country %><br>
*******<%= localized_country_select(:user, :country, [], {:include_blank => 'Please choose...'}) %>*******
</div>

      

When I try to access a new custom page the following error appears:

undefined method `map 'for" translation missing: en.countries ": String

Well thanks in advance guys

+3


source to share


1 answer


You need a local version of en.rb in your config / locale. Otherwise it won't work. Copy this to your config / locale.

https://raw.githubusercontent.com/mlitwiniuk/localized_country_select/master/locale/en.rb



Now restart your server and try.

+2


source







All Articles