Rails 模块的未定义方法“组" [英] Rails undefined method 'groups' for rails module

查看:48
本文介绍了Rails 模块的未定义方法“组"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Mac OS X 上工作,尝试学习 Rails.当我输入:rails generate Scaffold User name:string email:string"时,我收到以下错误:

Working on Mac OS X, trying to learn rails. When I type: "rails generate Scaffold User name:string email:string", I get the following error:

    /Users/dnf1991/rails_projects/demo_app/config/application.rb:7:in `<top (required)>': undefined method `groups' for Rails:Module (NoMethodError)
from /Users/dnf1991/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.0.9/lib/rails/commands.rb:15:in `require'
from /Users/dnf1991/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/railties-3.0.9/lib/rails/commands.rb:15:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

有什么想法吗?

推荐答案

我遇到了与您相同的问题.我把项目删了重新生成,没有按照说明修改项目中的gemfile使用1.3.3版本的sql(也没有注释掉其他默认的包含)和错误消失了.

I had this exact same problem following the same guide you are. I deleted the project and re-generated, and did not follow the instructions to modify gemfile in the project to use 1.3.3 version of sql (and didn't comment out the other default inclusions) and the error went away.

这篇关于Rails 模块的未定义方法“组"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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