Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In general gems are a more robust and supported way to add functionality to your app. There's a whole infrastructure on the Web and built into Rails to work with gems that isn't there for plugins.</p> <p>For example, if you use a gem you get the whole set of Rake tasks for dealing with gems.</p> <p>In your project root, run...</p> <pre><code>$ rake -T gem (in /Users/username/project/someproject) rake gems # List the gems that this rails application depends on rake gems:build # Build any native extensions for unpacked gems rake gems:build:force # Force the build of all gems rake gems:install # Installs all required gems. rake gems:refresh_specs # Regenerate gem specifications in correct format. rake gems:unpack # Unpacks all required gems into vendor/gems. rake gems:unpack:dependencies # Unpacks all required gems and their dependencies into vendor/gems. rake rails:freeze:gems # Lock this application to the current gems (by unpacking them into vendor/rails) </code></pre> <p>You can also specify gem dependencies in your <code>environment.rb</code> file. That gives you the ability to automatically install them with...</p> <pre><code>$ rake gems install </code></pre> <p>Another advantage of gems over plugins is that on the system level you have the <code>gem</code> utility for maintaining gems so that makes things easier.</p> <blockquote> <p>if it is as a gem ...when i put the app on the clients server..will I not have to get this plugin again?</p> </blockquote> <p>You can "freeze" gems into your app and deploy them as part of the app without installing them on the system. If you do that you won't have to get the gem or the plugin again unless you want to upgrade it to a newer version.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload