Another area that used to confuse me is gems and plug-ins. From time to time you will see a gem that can also be a plug-in. This caused a lot of confusion to me at first. I started thinking that they were the same things. This couldn’t have been farther from the truth.
When you install a gem it is adding that functionality to your core Ruby installation. This makes the functionality available to all Ruby applications that you develop on your system. An important distinction here is that it lives on your system, if you are developing your application on one computer and deploying it on another you need to install all the required gems on the deployment system also.
A plug-in does not get installed into the core Ruby directory. Instead it is installed directly into the framework of the application that you are working on. That being said, it is not available to any other applications that you develop and will need to be installed into each application that you want to use that functionality. However, if you plan to migrate your application to a different environment you will not have to worry about installing it again, as it is part of your application framework now. This can prevent a lot of confusion and makes changing environments much smoother.
