Plugin installation with git post-receive hook

How do you install a plugin when you use the git post-receive hook deployment method? My plugin works locally, but I’m not sure how to install it on my server. I tried installing in var/www/mysite and updating the Gemfile in that folder, but I’m seeing an installation error when Jekyll tries to build.