Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github action fails on macos-12 Error: input ruby-version needs to be specified #2

Open
isaac-tribal opened this issue Feb 22, 2023 · 2 comments

Comments

@isaac-tribal
Copy link

isaac-tribal commented Feb 22, 2023

Error: Error: input ruby-version needs to be specified if no .ruby-version or .tool-versions file exists at parseRubyEngineAndVersion (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68858:13) at setupRuby (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68795:35) at run (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68773:11) at /Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68938:40 at /Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68940:3 at Object.<anonymous> (/Users/runner/work/_actions/ruby/setup-ruby/v1/dist/index.js:68943:12) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1[15](https://github.com/TribalTech/ey-mobile/actions/runs/4244002769/jobs/7377509208#step:8:17)9:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:8[22](https://github.com/TribalTech/ey-mobile/actions/runs/4244002769/jobs/7377509208#step:8:24):12)

image

@gaguirre
Copy link

gaguirre commented Mar 1, 2023

Hi @isaac-tribal, thanks for reporting.
Are you getting this error on every run or on some specific branch?

@jpgarcia
Copy link
Contributor

jpgarcia commented Mar 1, 2023

Hi @isaac-tribal thanks for reporting this!

Nitro's action is using the ruby/setup-ruby action to ensure ruby is installed but it assumes your RN project includes a .ruby-version file which is not good as previous RN versions does not include this file by default or you may don't want to have this file in your project.

As a temporary workaround you can include a .ruby-version file specifying a version inside of it.

Upon further consideration, I believe that it should not be Nitro's responsibility to take care of this. Rather, it should be something that the end user should define, including a new step if necessary. Something like:

name: nitro-build-ios
on: workflow_dispatch
jobs:
  build:
    runs-on: macos-12
    env:
      NITRO_API_KEY: ${{ secrets.NITRO_API_KEY }}
    steps:
      - uses: actions/checkout@v3
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: '2.7.6' # or whatever version
      - uses: nitro-build/github-action-nitro-ios@v1

I'd like to hear your thoughts regarding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants