Reputation: 9974
I am new to rails and have a question regarding the plugins. It seems there are two approaches you can take when using a third party plugin in a ROR App:
1) install a gem using sudo gem install GEM, and then "require" it in your rails project
2) install the plugin using script/generate plugin install PLUGIN. The plugin in code appears in your vendor directory and then you are good to go (sometimes, i could not get Devise working via this method).
Since it appears both of these methods accomplish them same thing, why should I choose one method over the other.
Thanks,
Upvotes: 3
Views: 2786
Reputation: 66851
Try to install the gem version of something when you can. There are a couple of benefits you get over plugins:
gem update
. With plugins, you'd have to manually go out and update them yourself.You can still unpack gems to your vendor directory by running rake gems:unpack
. This is useful to "lock in" gems to their current version, and also makes for quicker deployment since you don't have to fetch them from a 3rd party site (which is the case if you do rake gems:install
).
Upvotes: 6