Open PhilCoggins opened 4 years ago
Literally just found https://github.com/rubygems/rubygems/issues/3304
Feel free to close unless there's any suggestions 😊.
We ran into this and added a script to rename the index paths:
sed -i “s|$(pwd)|/app|“ .bundle/plugin/index
By the way, we run that as part of the build process using https://github.com/weibeld/heroku-buildpack-run so that the paths are modified prior to the slug being built.
We ran into this and added a script to rename the index paths:
sed -i “s|$(pwd)|/app|“ .bundle/plugin/index
☝️ worked like a charm! Reposting code snippet without smart quotes:
sed -i "s|$(pwd)|/app|" .bundle/plugin/index
By the way, the heroku-buildpack-run
buildpack can be after the Ruby buildpack. Just FYI for future readers.
This hit us when using Elastic Beanstalk as well, and added this to ebextensions:
files:
# Runs before `99_reload_app_server.sh`:
"/opt/elasticbeanstalk/hooks/appdeploy/enact/98_reconfigure_bundle.sh":
mode: "000775"
owner: root
group: users
content: |
#!/usr/bin/env bash
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir)
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir)
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user)
EB_APP_CURRENT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir)
# Setting up correct environment and ruby version so that bundle can load all gems
. $EB_SUPPORT_DIR/envvars
. $EB_SCRIPT_DIR/use-app-ruby.sh
# Make sure that the .bundle directory is recreated
if [ -n "$DEPENDENCIES_NEXT" ]; then
rm -fr $EB_APP_CURRENT_DIR/.bundle
cd $EB_APP_CURRENT_DIR
su -s /bin/bash -c "bin/bundle install" $EB_APP_USER
fi
By the way, the heroku-buildpack-run buildpack can be after the Ruby buildpack. Just FYI for future readers.
@conarro worked like a charm. Thanks for the tip.
Note that the root issue here will break Capistrano deployments using bootboot if you are cleaning up old releases, as the plugin dir will point at a release directory that will eventually get cleaned up.
Hello, and thank you for this Bundler plugin.
I am trying to deploy a review app to Heroku with this plugin. It seems to install perfectly fine:
However, my postdeploy script invokes a rake task and raises the following.
I'm still researching a solution on my end but was hoping someone else has experienced this? Happy to provide any info necessary.
Thanks!