undefined class/module Function
程序员文章站
2022-07-05 13:39:11
...
my develop environment:
windows xp
F:\>ruby -v
ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
F:\>rails -v
Rails 3.0.5
在session中存了一个对象,并将session存到数据库中时,报错:undefined class/module Function
解决方法:在application_controller中加入
before_filter :preload_models def preload_models() Model1 Model2 ... ... ... Model9 end
参考:http://www.philsergi.com/2007/06/rails-memcached-undefinded-classmodule.html
http://shiningray.cn/rails-memcached-undefined-classmodule.html
推荐阅读
-
Fatal error: Call to undefined function curl_init()解决方法_php技巧
-
调用msg_get_queue()函数出错:Fatal error: Call to undefined function msg_get_queue()。解决方案
-
php 连上数据库之后出现Call to undefined function mssql_query()?
-
php中的Fatal error: Call to undefined function ssh2_connect()有关问题!
-
Fwd: Difference between 'def s elf. …' and module_function … RubyGmail
-
Call to undefined function apache_get_modules() 是什么原因?解决办法
-
every function in scala is an instance of a class
-
php连接Oracle,提示Call to undefined function Ora_Logon(),该如何解决
-
PHP中GD库的官方站文档中有显示ImageGifAnimBegin这个函数,为什么小弟我用在PHP中会提示undefined function
-
php运行出现Call to undefined function curl_init()的解决方法