Reputation: 399
I am trying to deploy APM solution provided by scout app. Scout apm documentation says I need to install a gem in all the applications I am running on the server. I have multiple applications running on single server. All my ruby applications are located at /var/www
. Is there a way I can deploy that apm gem in one place and then it can be used for all the services. so that I don't need to add it in each application Gemfile
and its config file in config
folder. I know I can achieve it using a shell script however problem with that approach is all the apps have their own git repo which would be administrative overhead for me.
Upvotes: 1
Views: 69
Reputation: 106792
No, you have to add gems that you want to use in an application to the Gemfile
. Because if you do not add that gem to an application's Gemfile
then the application will simply not load that gem.
Another option might be to install the gem globally ion the server and require
that gem in each application manually. But that still means you have to add a require 'gem_name'
to all applications and this is error-prone because you lose the magic provided by bundler
.
tl;dr: No, you have to add the gem to each application's Gemfile
.
Upvotes: 2