Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.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 有时获取未初始化的常量Deviate::CustomDeviate_Ruby On Rails_Ruby_Devise_Routing_Ruby On Rails 3.2 - Fatal编程技术网

Ruby on rails 有时获取未初始化的常量Deviate::CustomDeviate

Ruby on rails 有时获取未初始化的常量Deviate::CustomDeviate,ruby-on-rails,ruby,devise,routing,ruby-on-rails-3.2,Ruby On Rails,Ruby,Devise,Routing,Ruby On Rails 3.2,我已经定制了设计的注册(u controller.rb)和确认(u controller)。这些控制器位于custom_Desive文件夹下 有时我的注册和确认工作正常,但有时它会显示未初始化常量designe::customdesigne路由错误 一个奇怪的修正是每当我编辑routes.rb时,错误就会消失(实际上没有在routes.rb中添加任何内容) 我的routes.rb用于设计: devise_scope :user do scope :module => "custom_d

我已经定制了
设计
注册(u controller.rb)和
确认(u controller)。这些控制器位于custom_Desive文件夹下

有时我的注册和确认工作正常,但有时它会显示
未初始化常量designe::customdesigne
路由错误

一个奇怪的修正是每当我编辑
routes.rb
时,错误就会消失(实际上没有在
routes.rb
中添加任何内容)

我的
routes.rb
用于设计:

devise_scope :user do
  scope :module => "custom_devise" do
    match 'company_user/complete_profile' => 'confirmations#complete_profile', via: :get
  end
end

devise_for :users, path_names: {sign_in: "login", sign_out: "logout"},
           :controllers => { :registrations => "devise/custom_devise/registrations",
                             :confirmations => "devise/custom_devise/confirmations"
                           }
我正在使用以下设计模块:

devise :database_authenticatable, :registerable, :confirmable,
     :recoverable, :rememberable, :trackable, :validatable

注:我已经检查了所有类似的答案,但没有一个对我有帮助。因此,在重复这个问题之前,请先发表评论。

将路径从
设计/定制设计/注册更改为
定制设计/注册
,而
确认
也是如此