Friday, February 19, 2010

how to install plugin in rails project

You need to install plugins into your project. It is very simple once you know it. If you have the following error, it is because you don't have a plugin "acts_as_tree".

Error message:
undefined method `acts_as_tree' for #

In your model:
class Post < ActiveRecord::Base
acts_as_tree :order => "name"
end

In the command line windows/termial of your project directory, you can run the followin command:
./script/plugin install acts_as_tree

That is it. Now you don't see the error. And you should have "Vendor\plugins\acts_as_tree"

No comments:

Post a Comment