Git Product home page Git Product logo

Comments (4)

colindean avatar colindean commented on August 24, 2024

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.

from dpl.

Indecis1 avatar Indecis1 commented on August 24, 2024

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
error_travis
I search in .travis.yml but I don't see any 'ruby'

from dpl.

colindean avatar colindean commented on August 24, 2024

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.

from dpl.

Indecis1 avatar Indecis1 commented on August 24, 2024

Thanks it works.
I change this line

rvm use $TRAVIS_RUBY_VERSION do script.rb
in

- rvm use $TRAVIS_RUBY_VERSION  use 2.7.0

from dpl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.