dpl: script provider don't work with bundler on travis

I want to deploy with Capistrano after a Travis build.

I have tried some different thinks: A. This results in a bundler: command not found: cap error

deploy:
  provider: script
  script: bundle exec cap integration deploy
  on:
    branch: master

B. This results in the same error on Travis but works on my local machine:

after_success: "[[ $TRAVIS_BRANCH = 'master' ]] && gem install dpl && dpl --provider=script --script='bundle exec cap integration deploy'"

C. This works

after_success: "[[ $TRAVIS_BRANCH = 'master' ]] && bundle exec cap integration deploy"

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 18 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Yes but its still a workaround

An update would be great, since capistrano is dropping support for ruby < 2.0! https://github.com/capistrano/capistrano/commit/6015f943f4734c8744ff1534f9e455bb3f01b874

This works for me.

deploy:
  provider: script
    script: rvm use $(< .ruby-version) do bundle exec cap integration deploy
    skip_cleanup: true
    on:
      branch: master