0
我試圖工作設計可確認的電子郵件,但現在錯誤出現,它不起作用(在變化之前,它運作良好)。未定義的本地變量或方法`root_path'爲#<#<Class:0xc0d0c44>:0xc0be918>
如果有人可以幫助我識別它,我會很感激。
NameError#創建
未定義的局部變量或方法`root_path」爲#<#:0xc0be918> 你是什麼意思? font_path
在視圖大關,之後嘗試註冊:
<li><%= link_to "Start", root_path %></li>
在路線:
Rails.application.routes.draw do
devise_for :usuarios, controllers: {registrations: 'registrations', omniauth_callbacks: "omniauth_callbacks"}
root 'welcome#index'
get "welcome/index"
get ':controller(/:action(/:id))(.:format)'
post ':controller(/:action(/:id))(.:format)'
end
也
app/views/devise/mailer/confirmation_instructions.html.erb:12:in `_app_views_devise_mailer_confirmation_instructions_html_erb___614633226_'
app/controllers/registrations_controller.rb:6:in `create'
耙路線
Prefix Verb URI Pattern Controller#Action
new_usuario_session GET /usuarios/sign_in(.:format) devise/sessions#new
usuario_session POST /usuarios/sign_in(.:format) devise/sessions#create
destroy_usuario_session DELETE /usuarios/sign_out(.:format) devise/sessions#destroy
usuario_password POST /usuarios/password(.:format) devise/passwords#create
new_usuario_password GET /usuarios/password/new(.:format) devise/passwords#new
edit_usuario_password GET /usuarios/password/edit(.:format) devise/passwords#edit
PATCH /usuarios/password(.:format) devise/passwords#update
PUT /usuarios/password(.:format) devise/passwords#update
cancel_usuario_registration GET /usuarios/cancel(.:format) registrations#cancel
usuario_registration POST /usuarios(.:format) registrations#create
new_usuario_registration GET /usuarios/sign_up(.:format) registrations#new
edit_usuario_registration GET /usuarios/edit(.:format) registrations#edit
PATCH /usuarios(.:format) registrations#update
PUT /usuarios(.:format) registrations#update
DELETE /usuarios(.:format) registrations#destroy
usuario_confirmation POST /usuarios/confirmation(.:format) devise/confirmations#create
new_usuario_confirmation GET /usuarios/confirmation/new(.:format) devise/confirmations#new
GET /usuarios/confirmation(.:format) devise/confirmations#show
usuario_facebook_omniauth_authorize GET|POST /usuarios/auth/facebook(.:format) omniauth_callbacks#passthru
usuario_facebook_omniauth_callback GET|POST /usuarios/auth/facebook/callback(.:format) omniauth_callbacks#facebook
root GET / welcome#index
welcome_index GET /welcome/index(.:format) welcome#index
GET /:controller(/:action(/:id))(.:format) :controller#:action
POST /:controller(/:action(/:id))(.:format) :controller#:action
環境:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
user_name: ENV['uclave.cdcht'],
password: ENV[''],
domain: ENV['gmail'],
address: 'smtp.gmail.com',
port: '587',
authentication: :plain,
enable_starttls_auto: true
}
用戶= USUARIOS(西班牙)
可以請你發佈'耙路線'的結果嗎 –
你能不能包括你的routes.rb –
@Deepak有。我正在編輯帖子。 –