我想更新country_state_select寶石...更新country_state_select寶石
這是我的Gemfile
gem 'country_state_select'
gem 'chosen_rails'
gem 'compass-rails'
而且bundle
後,我將開始我的Rails應用程序rails s
我有錯誤,它看ilke
NoMethodError - undefined method `state_options' for CountryStateSelect:Module:
app/views/shared/users/_light_box_login.html.erb:101:in `block in _app_views_shared_users__light_box_login_html_erb___390633241__632173138'
actionview (4.2.7.1) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
actionview (4.2.7.1) lib/action_view/helpers/capture_helper.rb:202:in `with_output_buffer'
actionview (4.2.7.1) lib/action_view/helpers/capture_helper.rb:38:in `capture'
actionview (4.2.7.1) lib/action_view/helpers/form_helper.rb:444:in `form_for'
simple_form (3.3.1) lib/simple_form/action_view_extensions/form_helper.rb:26:in `block in simple_form_for'
simple_form (3.3.1) lib/simple_form/action_view_extensions/form_helper.rb:45:in `with_simple_form_field_error_proc'
simple_form (3.3.1) lib/simple_form/action_view_extensions/form_helper.rb:25:in `simple_form_for'
app/views/shared/users/_light_box_login.html.erb:44:in `_app_views_shared_users__light_box_login_html_erb___390633241__632173138'
actionview (4.2.7.1) lib/action_view/template.rb:145:in `block in render'
而我發現solution
我的意思是gem 'country_state_select', '3.0.1'
但是,當添加此寶石和包,我還有一個問題..
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "compass-rails":
In snapshot (Gemfile.lock):
compass-rails (= 3.0.2)
In Gemfile:
compass-rails
country_state_select (= 3.0.1) was resolved to 3.0.1, which depends on
compass-rails (~> 2.0.4)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
任何幫助me..how到更新版本的寶石..
它仍然country_state_select(2.0.0) –
我想country_state_select(3.0.1) –
不要指定版本號作爲country_state_select gem使用3.0.2現在默認和最新版本。將Gem'country_state_select','3.0.1'更改爲Gem'country_state_select',然後運行'bundle install'。如果它仍然不起作用,請嘗試「更新包更新country_state_select」 –