rails从版本2升级到版本3。未定义的方法“calendar_date_select_includes”

时间:2022-07-10 20:43:44

I'm using the calendar_date_select gem.

我正在使用calendar_date_select gem。

It was working fine in my rails 2.3.x versions.

它在我的rails 2.3运行得很好。x版本。

But now I am trying to upgrade it to 3.0.10

但是现在我想把它升级到3。0.10

Really stuck on error undefined method 'calendar_date_select_includes' for all pages.

所有页面的“calendar ar_date_select_include”方法都没有定义。

Gemfile just has:

Gemfile就有:

gem 'rails', '3.0.10'
gem 'mysql2', '~> 0.2.11'
gem "acts_as_list"
gem "simple_form"
gem "calendar_date_select"
gem "haml"

My views/layouts/application.html.haml page has this (Note: haml !)

我的观点/布局/ application.html。haml page有这个(注意:haml !)

%head
  = stylesheet_link_tag 'contam/default.scss'
  = stylesheet_link_tag 'main.css'
  = javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"
  = javascript_include_tag "jQueryUI/js/jquery-ui-1.8.11.custom.min.js"
  %script
    var $j = jQuery.noConflict();
  = javascript_include_tag :defaults
  = calendar_date_select_includes "silver"

Also my styles are not being loaded.

我的样式也没有加载。

1 个解决方案

#1


6  

It appears that the official Calendar Date Select gem is still not Rails 3 ready, as discussed in a previous SO answer.

看起来正式的日历日期选择gem仍然没有Rails 3准备好,正如前面所讨论的那样。

However, a fork provided by paneq does support Rails 3, so if you change your Gemfile from

但是,paneq提供的fork确实支持Rails 3,所以如果您将Gemfile改为

gem "calendar_date_select"

to

gem 'calendar_date_select', :git => 'http://github.com/paneq/calendar_date_select.git'

it should get you back up and running. I haven't personally used CDS in Rails 3, instead I migrated to formtastic and formtastic_datepicker_inputs which requires jQueryUI's date picker.

它应该能让你重新站起来奔跑。我个人没有在Rails 3中使用cd,而是迁移到formtastic和formtastic_datepicker_input,这需要jQueryUI的日期选择器。

#1


6  

It appears that the official Calendar Date Select gem is still not Rails 3 ready, as discussed in a previous SO answer.

看起来正式的日历日期选择gem仍然没有Rails 3准备好,正如前面所讨论的那样。

However, a fork provided by paneq does support Rails 3, so if you change your Gemfile from

但是,paneq提供的fork确实支持Rails 3,所以如果您将Gemfile改为

gem "calendar_date_select"

to

gem 'calendar_date_select', :git => 'http://github.com/paneq/calendar_date_select.git'

it should get you back up and running. I haven't personally used CDS in Rails 3, instead I migrated to formtastic and formtastic_datepicker_inputs which requires jQueryUI's date picker.

它应该能让你重新站起来奔跑。我个人没有在Rails 3中使用cd,而是迁移到formtastic和formtastic_datepicker_input,这需要jQueryUI的日期选择器。