Trying to get carmen_rails up and running to add country and subregion(state) to my home-rolled user registration and came across an issue I'm having w/ little help from any online searches (at least from what I can find).
Installed
gem 'carmen-rails', '~> 1.0.0'
Following the github instructions (https://github.com/jim/carmen-rails), the following code should be inserted into my registration page:
<%= simple_form_for @user do |f| %>
<%= f.input :country_code do %>
<%= f.country_select :country_code, {object: f.object, prompt: 'Country'} %>
<% end %>
<% end %>
I'm currently using Rails 4.0.0 and Bootstrap 3 RC2 so my registration code looks like this (along with the standard form setup):
<div class="form-group">
<%= f.label :country, class: "col-md-4 control-label" %>
<div class="col-md-8">
<%= f.country_select :country, {priority: %w(US CA), prompt: "Please select a country", class: "form-control"} %>
</div>
</div>
and validation section from app/models/user.rb
validates :country, presence: true
validates :subregion, presence: true
I get the error below and can't figure out the root cause or resolution. Any help is greatly appreciated!
wrong number of arguments (3 for 0)
I was getting the error below, but think it was resolved by restarting the rails server
undefined method `country_select' for ..