0

Devise を Rails アプリに統合しようとしていますが、うまくいきません。

ページにユーザー登録フォームを表示したい:

私は実行rails generate devise:viewsして得ました:

  invoke  Devise::Generators::SharedViewsGenerator
  create    app/views/devise/shared
  create    app/views/devise/shared/_links.erb
  invoke  form_for
  create    app/views/devise/confirmations
  create    app/views/devise/confirmations/new.html.erb
  create    app/views/devise/passwords
  create    app/views/devise/passwords/edit.html.erb
  create    app/views/devise/passwords/new.html.erb
  create    app/views/devise/registrations
  create    app/views/devise/registrations/edit.html.erb
  create    app/views/devise/registrations/new.html.erb
  create    app/views/devise/sessions
  create    app/views/devise/sessions/new.html.erb
  create    app/views/devise/unlocks
  create    app/views/devise/unlocks/new.html.erb
  invoke  erb
  create    app/views/devise/mailer
  create    app/views/devise/mailer/confirmation_instructions.html.erb
  create    app/views/devise/mailer/reset_password_instructions.html.erb
  create    app/views/devise/mailer/unlock_instructions.html.erb

land.html.haml

= render 'devise/registrations/new'

しかし、私はエラーが発生します:

Missing partial devise/registrations/new with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :coffee, :haml]}. Searched in:
  * ".../app/views"
  * ".../.rvm/gems/ruby-2.0.0-p0@startupcrawler/gems/devise-1.5.4/app/views"

これも機能しません。

= render 'users/registrations/new'

何か間違った設定をしましたか?

4

3 に答える 3

0

それは = render 'devise/registrations/new' です

あなたは「s」を逃した

于 2013-04-23T14:01:39.240 に答える
0

:template を haml = render :template => 'devise/registrations/new' のように使用します

于 2016-07-25T20:54:16.773 に答える