Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/70.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 4 没有与[POST]匹配的路线”/index.html“;轨道4设计_Ruby On Rails 4_Devise - Fatal编程技术网

Ruby on rails 4 没有与[POST]匹配的路线”/index.html“;轨道4设计

Ruby on rails 4 没有与[POST]匹配的路线”/index.html“;轨道4设计,ruby-on-rails-4,devise,Ruby On Rails 4,Devise,嗨,我的路线有问题,当我访问我的url时,我使用了一个装置 http://localhost:3000/users/sign_in 当我尝试注册或登录时出现问题,显示以下错误 没有路由匹配[POST]“/index.html” 这是我的文件route.rb MesaAyuda::Application.routes.draw do #para combo subcategoria en subfamilia incidencia get 'fam_subcat_incidenci

嗨,我的路线有问题,当我访问我的url时,我使用了一个装置

http://localhost:3000/users/sign_in
当我尝试注册或登录时出现问题,显示以下错误

没有路由匹配[POST]“/index.html”

这是我的文件route.rb

 MesaAyuda::Application.routes.draw do


  #para combo subcategoria en subfamilia incidencia
  get 'fam_subcat_incidencias/:id/edit_subcategoria_incidencias' => 'fam_subcat_incidencias#update_subcategoria_incidencias', as: 'edit_subcategoria_incidencias'
  get 'fam_subcat_incidencias/update_subcategoria_incidencias' => 'fam_subcat_incidencias#update_subcategoria_incidencias', as: 'update_subcategoria_incidencias'

  resources :operarios

  resources :fam_subcat_incidencias


  devise_for :users
  resources :perfiles

  resources :nivel_accesos

  resources :subcategoria_incidencias 


  resources :categoria_incidencias

  resources :ubicaciones

  resources :categorias

  root :to => 'categorias#index'



  # The priority is based upon order of creation: first created -> highest priority.
  # See how all your routes lay out with "rake routes".

  # You can have the root of your site routed with "root"
  # root 'welcome#index'

  # Example of regular route:
  #   get 'products/:id' => 'catalog#view'

  # Example of named route that can be invoked with purchase_url(id: product.id)
  #   get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

  # Example resource route (maps HTTP verbs to controller actions automatically):
  #   resources :products

  # Example resource route with options:
  #   resources :products do
  #     member do
  #       get 'short'
  #       post 'toggle'
  #     end
  #
  #     collection do
  #       get 'sold'
  #     end
  #   end

  # Example resource route with sub-resources:
  #   resources :products do
  #     resources :comments, :sales
  #     resource :seller
  #   end

  # Example resource route with more complex sub-resources:
  #   resources :products do
  #     resources :comments
  #     resources :sales do
  #       get 'recent', on: :collection
  #     end
  #   end

  # Example resource route with concerns:
  #   concern :toggleable do
  #     post 'toggle'
  #   end
  #   resources :posts, concerns: :toggleable
  #   resources :photos, concerns: :toggleable

  # Example resource route within a namespace:
  #   namespace :admin do
  #     # Directs /admin/products/* to Admin::ProductsController
  #     # (app/controllers/admin/products_controller.rb)
  #     resources :products
  #   end
end
这是我的模型用户

    class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :token_authenticatable, :confirmable,
  # :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
        :recoverable, :rememberable, :trackable, :validatable
  belongs_to :perfil       
end
class用户
现在查看登录表单或操作日志的源代码指向.././index.html

因为这种行为发生了?我做错了请帮帮我我快疯了

<form action="../../index.html" method="post">
                <div class="body bg-gray">

                    <h2>Sign in</h2>

登录

从我的角度来看,您必须创建控制器类别,并在该控制器中定义索引方法并检查它,这可能是可行的