ProblemYou want to install a plug-in, adding functionality to your application. You also want to know how to remove plug-ins that you've installed. SolutionInstall a plug-in by passing the name of the plug-in to the install command of the plugin script. The following installs the sparklines plug-in locally: rob@mac:~/webapp$ ruby script/plugin install sparklines + ./sparklines/MIT-LICENSE + ./sparklines/README + ./sparklines/Rakefile + ./sparklines/generators/sparklines/sparklines_generator.rb + ./sparklines/generators/sparklines/templates/controller.rb + ./sparklines/generators/sparklines/templates/functional_test.rb + ./sparklines/init.rb + ./sparklines/lib/sparklines.rb + ./sparklines/lib/sparklines_helper.rb Plug-ins are installed as directories in vender/plugins: rob@mac:~/webapp$ ls vendor/plugins/sparklines/ MIT-LICENSE README Rakefile generators/ init.rb lib/ Un-install a plug-in with the remove command of the plugin script, passing it one or more plug-in names: rob@mac:~/webapp$ ruby script/plugin remove sparklines DiscussionThe plugin script inspects your environment and looks for evidence of your vender/plugins directory being user Subversion. If it is, the install command sets a svn:externals property on the directory of each plug-in you install, allowing you to use normal Subversion commands to keep the plug-in(s) up to date. If your vender/plugins isn't under Subversion control, plug-ins can be installed using the svn co command. The --help option of install lists the following options, which allow you to explicitly specify install methods, specific plug-in revision numbers, and forced reinstallations of plug-ins:
See Also
|