Giter VIP home page Giter VIP logo

Comments (10)

paul avatar paul commented on August 15, 2024 36

And now Ruby is up to 2.6.5, Heroku and CircleCI already have updates for it. Should we just assume this setup-ruby action will be out-of-date, and use the docker form of workflows instead?

from runner-images.

clupprich avatar clupprich commented on August 15, 2024 2

@elalemanyo you donβ€˜t need to use sudo, just leave it off

from runner-images.

dentarg avatar dentarg commented on August 15, 2024 1

Has anyone found a way to install a specific ruby version manually?

I think you can install it however you want, as you can run arbitrary commands (and you are allowed to sudo).

Or you can use Docker. Example using the official images.

name: Ruby

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Build and test with Rake
      run: |
        gem install bundler
        bundle install --jobs 4 --retry 3
        bundle exec rake
    container:
      image: ruby:2.6.4

from runner-images.

bobmaerten avatar bobmaerten commented on August 15, 2024

Too bad 2.6.4 is not supported (even in v1.1.0). Container specification is much longer to build (1m30 vs 30s)

from runner-images.

MSP-Greg avatar MSP-Greg commented on August 15, 2024

Using rvm with ruby-head takes a bit under 60 seconds, other versions should be similar. Example workflow in ruby/ruby.

Regardless, I would prefer that current versions be pre-installed...

from runner-images.

ain avatar ain commented on August 15, 2024

ruby:2.6.4 fetch took 42s. There's no build, it'll just fetch all layers. Quite reasonable.

from runner-images.

elalemanyo avatar elalemanyo commented on August 15, 2024

@ain I am trying to use docker to install ruby:2.6.4, that works great. But after I need to add libpq-dev to be able to use Postgres, I was doing this:

    - name: Install required package for Postgres
      run: |
        sudo apt-get install libpq-dev

But GitHub Actions is not liking it: sudo: not found
I am doing something wrong?

from runner-images.

elalemanyo avatar elalemanyo commented on August 15, 2024

@clupprich thanks!
Without sudo looks to work, but now I have issues with postgres πŸ˜”
I set postgres service like this:

    services:
      postgres:
        image: postgres:10.8
        env:
          POSTGRES_USER: postgres
          POSTGRES_PASSWORD: ""
          POSTGRES_DB: postgres
        # needed because the postgres container does not provide a healthcheck
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

After I try to create my DB:

    - name: Build and create DB
      env:
        POSTGRES_HOSTNAME: postgres
        POSTGRES_USER: postgres
        POSTGRES_PORT: 5432
        RAILS_ENV: test
      run: |
        bin/rails db:setup

But I am getting this error:

could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

from runner-images.

eregon avatar eregon commented on August 15, 2024

FWIW https://github.com/eregon/use-ruby-action supports all Ruby 2.6.x versions.

from runner-images.

alepauly avatar alepauly commented on August 15, 2024

This is done, Windows and Linux runners are now in 2.6.5

from runner-images.

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.