Rails 3 - How to install awesome_nested_set
I want to install awesome_nested_set in my Rails 3 app. This is a plugin, versus a gem. I've installed gems but never a plugin.
The awesome_nested_set is here: https://github.com/collectiveidea/awesome_nested_set
But that appears to not be Rails 3 friendly, according to several reported issues.
There is a Rails 3 friendly fork here: https://github.com/FreakyDazio/awesome_nested_set
But I'm not sure how to install this? How do I install this plugin 开发者_运维技巧in my Rails 3 app?
Thanks
In Rails 3, install a plugin via:
rails plugin install <path to plugin>
So, for this plugin:
rails plugin install git://github.com/FreakyDazio/awesome_nested_set.git
Using just rails plugin
will give you additional information.
In Rails 3, the script/foo
scripts have been replaced by calling rails
directly, so in your case, to install the FreakyDazio fork of awesome_nested_set
:
rails plugin install git://github.com/FreakyDazio/awesome_nested_set.git
Rails by default looks in vendor/plugins
(which is where rails plugin install
will install to) for plugins to load (at which time, the plugin's init.rb file will be run). Here is an article about plugins in Rails 3. You might want to read about the Rails initialization process as well.
精彩评论