如何在 rails 3 中安装插件,获取命令不是模块(TypeError) [英] How to install a plugin in rails 3, getting a Commands is not a module (TypeError)

查看:23
本文介绍了如何在 rails 3 中安装插件,获取命令不是模块(TypeError)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将其安装为插件:

I'm trying to install this as a plugin:

https://github.com/phatworx/rack_ip_restrictor

所以我跑:

$ rails plugin install git://github.com/phatworx/rack_ip_restrictor.git

此错误:

/Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/railties-3.0.5/lib/rails/commands/plugin.rb:277:in `<top (required)>': Commands is not a module (TypeError)
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `block in require'
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `block in load_dependency'
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/activesupport-3.0.5/lib/active_support/dependencies.rb:239:in `require'
    from /Users/userme/.rvm/gems/ruby-1.9.2-p180@andyw/gems/railties-3.0.5/lib/rails/commands.rb:17:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

建议、想法?谢谢

推荐答案

GitHub 上有解决方案- 检查评论.

这篇关于如何在 rails 3 中安装插件,获取命令不是模块(TypeError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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