未初始化的常量ActionView :: Helpers :: InstanceTag(NameError) - jquery_datepicker gem error [英] Uninitialized constant ActionView::Helpers::InstanceTag (NameError) - jquery_datepicker gem error

查看:76
本文介绍了未初始化的常量ActionView :: Helpers :: InstanceTag(NameError) - jquery_datepicker gem error的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 < div> 

<%= f.datepicker'date'%>< / div>
< div><%= f.datetime_picker'date',:dateFormat => yy-mm-dd%>< / div>

和这一个

 < h5>< i class =fa fa-calendar-o>< / i><%= datepicker_inputevent,date%>< / h5> 

当我重置服务器时,我收到以下错误(并且服务器未启动现在):

blockquote
usr / local / rvm / gems / ruby​​-2.0.0-p247 / gems / jquery_datepicker-0.4 / lib / app /helpers/form_helper.rb:33:in`:未初始化的常量ActionView :: Helpers :: InstanceTag(NameError)

完整的错误



https://gist.github.com/ naushadparpia / 7819419

解决方案

您是使用rails 4还是rails 3?你有两个标签。看起来你使用的是rails 4,ActionView :: Helpers :: InstanceTag来自Rails 3,而不是Rails 4.查看jquery-datepicker gem github页面,它看起来像是gem不是rails 4兼容。



有人试图修复它,使其工作在Rails 4 此处。祝你好运!


Just installed the jquery-datepicker gem and have used a few of the helpers in the view:

<div><%= f.datepicker 'date' %></div>
<div><%= f.datetime_picker 'date', :dateFormat => "yy-mm-dd" %></div>   

and this one

<h5><i class="fa fa-calendar-o"></i><%= datepicker_input "event","date" %></h5>

and when I reset the server I'm getting the following error (and the server isn't starting now):

usr/local/rvm/gems/ruby-2.0.0-p247/gems/jquery_datepicker-0.4/lib/app/helpers/form_helper.rb:33:in `': uninitialized constant ActionView::Helpers::InstanceTag (NameError)

Full error

https://gist.github.com/naushadparpia/7819419

解决方案

Are you using rails 4 or rails 3? You have tags for both. It would seem you are using rails 4, ActionView::Helpers::InstanceTag is from Rails 3 and is not in Rails 4. Looking at the jquery-datepicker gem github page, it looks like that gem is not rails 4 compatible.

Somebody tried to fix it to make it work in Rails 4 here. Good luck!

这篇关于未初始化的常量ActionView :: Helpers :: InstanceTag(NameError) - jquery_datepicker gem error的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆