未初始化的常量色器件::控制器:: internalhelpers [英] uninitialized constant devise::controllers::internalhelpers

查看:241
本文介绍了未初始化的常量色器件::控制器:: internalhelpers的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Rails和使用设计的宝石上的身份验证目前的工作。我想从我的移动应用我的服务器进行通信。所以我通过JSON发送数据。当我试图登录它表明我下面的错误:

I'm new to rails and currently working on authentication using devise gem. I would like to communicate with my server from my mobile app. So I'm sending data via JSON. When I tried to sign in it shows me the below error:

  ActionController::RoutingError (uninitialized constant Devise::Controllers::InternalHelpers):
  app/controllers/session_controller.rb:4:in `<class:SessionController>'
  app/controllers/session_controller.rb:1:in `<top (required)>'

当我使用设计的宝石1.4.6版,它的工作对我罚款。但是,我想,使其与色器件版本2.1.0工作,或者以后才能使用,它支持任何新功能。

When I was using devise gem version 1.4.6, it was working fine for me. But, I want to make it work with devise version 2.1.0 or later to be able to use any new features that it supports.

如果任何人有这样的运行或有什么想法,请帮助我。先谢谢了。

If anybody have this running or have any idea please help me. Thanks in advance.

问候,

Senthil。

推荐答案

综观过去的承诺,InternalHelpers已被删除:
<一href=\"https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73\">https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73

Looking at the past commit, InternalHelpers has been removed: https://github.com/plataformatec/devise/commit/d9df632671b568e85bc79feb2c8de54fa0518f73

根据测试用例的InternalHelpers,你现在应该直接从DeviseController大多数InternalHelper方法都包含在里面已经继承。

Based on the test case for InternalHelpers, you should now, inherit directly from DeviseController as most InternalHelper methods are included in there already.

<一个href=\"https://github.com/plataformatec/devise/blob/master/test/controllers/internal_helpers_test.rb\">https://github.com/plataformatec/devise/blob/master/test/controllers/internal_helpers_test.rb

类和myController的LT; DeviseController

class MyController < DeviseController

结束

希望这有助于!

这篇关于未初始化的常量色器件::控制器:: internalhelpers的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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