Ruby on rails 使用Rails 4.2.4/React 0.14.6和Desive 4.0/babel-core 6.7.4/webpack 1.12.14缺少模板

Ruby on rails 使用Rails 4.2.4/React 0.14.6和Desive 4.0/babel-core 6.7.4/webpack 1.12.14缺少模板,ruby-on-rails,ruby-on-rails-4,reactjs,devise,webpack,Ruby On Rails,Ruby On Rails 4,Reactjs,Devise,Webpack,我在我的测试应用程序中添加了Desive 4.0(这是一个灵活的身份验证解决方案),它工作得非常好。但是,当我编写选项以更新索引视图中的概要文件时。我得到以下错误: 缺少模板配置文件/更新,应用程序/更新为{:locale=>[:en],:formats=>[:html],:variants=>[],:handlers=>[:erb,:builder,:raw,:ruby,:jbuilder]}。搜索:“/Users/jalanya/Documents/dev/ruby/twitter clon

我在我的测试应用程序中添加了Desive 4.0(这是一个灵活的身份验证解决方案),它工作得非常好。但是,当我编写选项以更新索引视图中的概要文件时。我得到以下错误:

缺少模板配置文件/更新,应用程序/更新为{:locale=>[:en],:formats=>[:html],:variants=>[],:handlers=>[:erb,:builder,:raw,:ruby,:jbuilder]}。搜索:“/Users/jalanya/Documents/dev/ruby/twitter clone/app/views”*“/Users/jalanya/.rvm/gems/ruby-2.2.2/gems/devise-4.0.0/app/views”

目前,我只有一个名为“index.html.erb”的文件夹views/profile下面的视图。因此,我的问题是我是否应该为“profile#update”操作添加另一个视图模板?如果是,我该怎么做

我在github中有我的测试应用程序,如果你也想测试的话。请在下面找到我目前拥有的文件

routes.rb

Rails.application.routes.draw do

  get 'profile' => 'profile#index'
  post 'profile' => 'profile#update'

  devise_for :users
  root 'home#index'
end
class ProfileController < ApplicationController
  before_action :authenticate_user!
  def index
  end
  def update
  end
end
profile\u controller.rb

Rails.application.routes.draw do

  get 'profile' => 'profile#index'
  post 'profile' => 'profile#update'

  devise_for :users
  root 'home#index'
end
class ProfileController < ApplicationController
  before_action :authenticate_user!
  def index
  end
  def update
  end
end
class ProfileController
views/profile/index.html.erb

<h2>Update profile</h2>
<%= form_tag "/profile" do %>
  <div class="row">
    <form class="col s12">
      <div class="row">
        <div class="input-field col s6">
          <input name="first_name" id="first_name" type="text" class="validate">
          <label for="first_name">First Name</label>
        </div>
        <div class="input-field col s6">
          <input name="last_name" id="last_name" type="text" class="validate">
          <label for="last_name">Last Name</label>
        </div>
        </div>
      <div class="row">
        <button type="submit" class="btn right">Save</button>
      </div>
    </form>
   </div>
<% end %>
更新配置文件
名字
姓
拯救

请让我知道您的反馈。

您需要添加一个更新视图或在路由文件中注释掉该行。现在,您正在告诉routes一个不存在的视图


要添加它,您可以键入“rails生成视图”或手动执行此操作。

您需要添加更新视图或在routes文件中注释掉该行。现在,您正在告诉routes一个不存在的视图

要添加它,您可以键入“rails生成视图”或手动执行