Skip to Main Content
Professional Ruby on Rails™
book

Professional Ruby on Rails™

by Noel Rappin
February 2008
Intermediate to advanced content levelIntermediate to advanced
479 pages
14h
English
Wrox
Content preview from Professional Ruby on Rails™

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Ruby on Rails® Bible

Ruby on Rails® Bible

Timothy Fisher
Rails 4 in Action

Rails 4 in Action

Yehuda Katz, Rebecca Skinner, Stephen Klabnik, Ryan Bigg

Publisher Resources

ISBN: 9780470223888Purchase book