简体   繁体   English

未定义的方法“关闭!” 对于nil:NilClass

[英]undefined method `close!' for nil:NilClass

I'm getting a really weird error with rails. 我在使用Rails时遇到了一个非常奇怪的错误。 It happens periodically every so often (and it seems to be when I wake up my computer after a long while) 它经常每隔一段时间发生一次( 似乎是很长一段时间后我唤醒计算机时)

undefined method `close!' for nil:NilClass
 (in /usr/local/rvm/gems/ruby-2.0.0-p247/gems/turbolinks-1.3.0/lib/assets/javascripts/turbolinks.js.coffee)

Eventually it will fix itself. 最终它将自行修复。 It doesn't fix if I restart the server and it happens with different coffeescript files constantly. 如果我重新启动服务器,它并不能解决,并且它经常与其他coffeescript文件一起发生。 In the case above, it is turbolinks. 在上述情况下,它是turbolinks。 However before I restarted the server and refreshed a few times it was history.js.coffee - What is going on here? 但是,在我重新启动服务器并刷新几次之前,它是history.js.coffee这是怎么回事?

EDIT: Now after restarting it works magically. 编辑:现在重新启动后,它神奇地工作。 Obviously it's not a problem now but it's happening at random points and it is slowing down my workflow. 显然,这现在不是问题,但它是随机发生的,并且减慢了我的工作流程。 It sounds like a permissions problem but they all seem correct.q 听起来像是权限问题,但它们似乎都是正确的。

This is most likely because the CoffeeScript cannot be compiled on the fly. 这很可能是因为CoffeeScript无法即时编译。

In production check things like enough disk space and enough available memory. 在生产中检查诸如足够的磁盘空间和足够的可用内存之类的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM