2012-02-10 51 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