In order to deal with GIT based gems, you'll need to make add some additional .ebextensions/*.config files.
- Support GIT in your EC2 instance;
- Backup the existing bundle command
- Bootstrap your rails project to add in your vendor directory to the shared environment
- Replace your bundle_install with a better bundle_install_deployment approach
Please note that these are placed in your Rails applications .ebextensions folder.