In general, gems are a more reliable and supported way to add functionality to your application. There is a whole infrastructure on the Internet and is built into Rails for working with precious stones, which are not for plugins.
For example, if you use a gem, you get the whole set of Rake tasks for working with gems.
Run at the root of your project ...
$ 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)
You can also specify gem dependencies in your environment.rb file. This gives you the ability to automatically install them using ...
$ rake gems install
Another advantage of gems over plugins is that at the system level you have a gem utility for saving gems, which makes the task easier.
if it’s like a gem ... when I put the application on the client server. I will not need to download this plugin again?
You can freeze gems in your application and deploy them as part of the application without installing them in the system. If you do this, you won’t have to get this stone or plugin again unless you want to upgrade to a newer version.
source share