接收未定义的方法`generators'错误 [英] Receving the undefined method `generators' error

查看:86
本文介绍了接收未定义的方法`generators'错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行RailsTorrent( https://github.com/raskhadafi/railstorrent )时,我出现以下错误:

When I run the RailsTorrent(https://github.com/raskhadafi/railstorrent), I got the error below :

[root@sookcha railstorrent]# rails s
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/railtie/configuration.rb:85:in `method_missing': undefined method `generators' for #<Rails::Railtie::Configuration:0x000000024eef38> (NoMethodError)
from /usr/local/lib/ruby/gems/1.9.1/gems/inherited_resources-1.1.2/lib/inherited_resources.rb:24:in `<class:Railtie>'
from /usr/local/lib/ruby/gems/1.9.1/gems/inherited_resources-1.1.2/lib/inherited_resources.rb:22:in `<module:InheritedResources>'
from /usr/local/lib/ruby/gems/1.9.1/gems/inherited_resources-1.1.2/lib/inherited_resources.rb:3:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:66:in `block in require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
from /root/railstorrent/config/application.rb:7:in `<top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:53:in `require'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:53:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:50:in `tap'
from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

我正在CentOS 6.2系统上运行Ruby 1.9.3p0(2011-10-30修订版33570)[x86_64-linux],Rails 3.2.3.

I'm running Ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] , Rails 3.2.3 on my CentOS 6.2 system.

我已经搜索了错误代码,但是找不到它.

I've searched the error code, but I can't find about it.

我该如何解决?

推荐答案

您的inherited_resources(1.1.2)版本与Rails 3.2.3不兼容,请尝试将inherited_resources更新为1.3.1. Rails 3.1不推荐使用config.generators,而推荐使用config.app_generators,因此已被Rails 3.2淘汰.

Your version of inherited_resources (1.1.2) is not compatible with Rails 3.2.3, try updating inherited_resources to 1.3.1. Rails 3.1 deprecated config.generators in favor of config.app_generators and therefore has been thrown out in Rails 3.2

这篇关于接收未定义的方法`generators'错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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