2012-02-10 50 views
0

我花了几个小时试图弄清楚如何在Rails 3中安装插件(可能是我自己构建插件的时间)。所以我不希望浪费更多时间,而是希望能够简单地解释一下,我可以如何将plugins插件(我在这里解压缩)插入到应用程序中。为Rails 2的安装说明如下:如何让Rails 3插件工作?

然后,你需要在配置文件,数据库迁移和UI文件复制到你的应用程序,像这样:

./script/generate install_has_threaded_comments

+0

它看起来像宝石has_threaded_comments(插件)不支持轨道3.退房[acts_as_commentable_with_threading] (https://github.com/elight/acts_as_commentable_with_threading)Rails 3线程注释。里面还有安装说明。 – dapangro 2012-02-10 04:06:28

+0

谢谢.. Rails 2和Rails 3中的材质之间存在很大的摩擦。我真的很希望新版本不会很快发布。 – 2012-02-10 04:19:15

+0

没问题。查看[Ruby Toolbox](https://www.ruby-toolbox.com)查看常见宝石列表,并尝试使用支持Rails 3的宝石。 – dapangro 2012-02-10 04:28:00

回答

0

的Rails 3.2有不赞成使用供应商/插件的警告,并主张将Gem文件添加到Gemfile中。

gem 'acts_as_commentable_with_threading' 

Rails 3的转换梁2的脚本/生成(或脚本/任何东西)来:

rails generate acts_as_commentable_with_threading_migration