Closed Indecis1 closed 2 years ago
Your screenshot shows that the current Ruby version is 2.4.5. That's the ${travis_internal_ruby}
. You might need to set up your deploy step in a separate step kinda like GitLab users do in their .gitlab.yaml
:
deploy_staging:
stage: deploy
type: deploy
image: ruby:latest
script:
# workaround https://github.com/travis-ci/dpl/issues/1247
- gem install dpl && gem install faraday -v 1.8.0
- dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_API_KEY
except:
- schedules
only:
- merge_requests
You'll have to translate that to the equivalent in Travis config, though, obviously.
Thanks. My new file .travis.yml
language: java jdk: - openjdk8 env: - HEROKU_APP_NAME = [heroku_app_name] before_install: - chmod +x mvnw script: - mvn clean verify deploy: provider: script skip_cleanup: true script: - rvm use $TRAVIS_RUBY_VERSION do script.rb - gem install dpl && gem install faraday -v 1.8.0 - dpl --provider=heroku --app=$HEROKU_APP_NAME --api-key=$HEROKU_PRODUCTION_API_KEY on: repo: [my_repo_github] branch: main
but now I have a new problem I search in .travis.yml but I don't see any 'ruby'
I don't see how that could be happening, either.
Try replacing $TRAVIS_RUBY_VERSION
with 2.7.0
-- the key problem is that Travis' ruby is too old -- that's the error in your original post.
Thanks it works. I change this line
rvm use $TRAVIS_RUBY_VERSION do script.rbin
- rvm use $TRAVIS_RUBY_VERSION use 2.7.0
Hello. I have a spring boot project. I last compiled it 8 days ago, but today I compile it and I have this error when travis want to deploy my project on Heroku.
Log
.travis.yml