Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 使用webrat时登录失败_Ruby On Rails_Session_Redirect_Restful Authentication_Webrat - Fatal编程技术网

Ruby on rails 使用webrat时登录失败

Ruby on rails 使用webrat时登录失败,ruby-on-rails,session,redirect,restful-authentication,webrat,Ruby On Rails,Session,Redirect,Restful Authentication,Webrat,我正在rails 2.3.5上使用restful_身份验证1.1.6,并使用webrat 0.7.1进行测试 当我使用浏览器进行测试时,登录可以正常工作。什么时候 我使用webrat,它首先正确登录并设置当前用户和会话[:user\u id]。 然后,在操作结束时执行重定向(:controller=>session,:action=>create)时,它将会话[:user\u id]和当前用户设置为nil! 只有在末尾有重定向时才会发生这种情况。如果存在“render:text”,则不会擦除会话

我正在rails 2.3.5上使用restful_身份验证1.1.6,并使用webrat 0.7.1进行测试 当我使用浏览器进行测试时,登录可以正常工作。什么时候 我使用webrat,它首先正确登录并设置当前用户和会话[:user\u id]。 然后,在操作结束时执行重定向(:controller=>session,:action=>create)时,它将会话[:user\u id]和当前用户设置为nil! 只有在末尾有重定向时才会发生这种情况。如果存在“render:text”,则不会擦除会话[:user_id]和当前用户的值!
有什么想法吗?我如何解决这个问题?

结果我冻结了错误版本的rails(2.3.8)。在我冻结了2.3.5版之后,一切正常