#< RegistrationsController:0x007f97b41326f0>的未定义局部变量或方法“ root_path”; [英] undefined local variable or method `root_path' for #<RegistrationsController:0x007f97b41326f0>

查看:80
本文介绍了#< RegistrationsController:0x007f97b41326f0>的未定义局部变量或方法“ root_path”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试其他人创建的RoR项目。我正在尝试登录并为该项目创建了新的用户名和密码。不幸的是,我收到以下错误:

I am trying to work on a RoR project that someone else created. I am trying to log in and created a new user name and password for the project. Unfortunately, I am getting the following error:

undefined local variable or method `root_path' for #<RegistrationsController:0x007f97b41326f0>

这是我的database.yml文件:

This is my database.yml file:

development:
  adapter: postgresql
  encoding: unicode
  database: name_of_app_development
  pool: 5


推荐答案

您没有在其中定义 root 您的 routes.rb ,例如:

You do not have root defined within your routes.rb, e.g:

root 'home#index'

这篇关于#&lt; RegistrationsController:0x007f97b41326f0&gt;的未定义局部变量或方法“ root_path”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆