15.1. Using Plugins
Rails plugins cover a wide range of complexity and features. Just within the space of this book, the installed plugins cover everything from the simple addition of a Rake task or two, to text searching, to an entire internationalization system, to graph generators, to in-place editing. And that covers less than half of the plugins that we've explored in Soups OnLine. Still, it's only a drop in the bucket compared to what's actually out there.
15.1.1. Installing Plugins
Every plugin installed thus far in the book uses the entire URL of that plugin's subversion repository, with something like the following:
$ script/plugin install http://url/plugin_name
Rails attempts to automatically determine the best way to download the plugin. If Subversion is on your system, meaning that the svn command is in your path, then Rails will perform a Subversion export command to your local system; otherwise, Rails will get the files via HTTP. In either case, a new directory is created in vendor/rails/plugin_name, and the files are placed there locally without Subversion metadata and without touching your existing source control repository. Because of this, you'll need to reinstall the plugin to incorporate any later code updates. Ordinarily, Rails will not allow you to install a plugin that is already there; however, the -f option will force a load even if the plugin already exists locally.
There are two different command-line options that you can use to incorporate the plugin's ...
Get Professional Ruby on Rails™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.