1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GitHub Actions ReviewDog がエラー

Posted at

ReviewDogをGithub actions経由で使っていたら急にエラーが発生

 Installing rubocop with extensions ... https://github.com/rubocop/rubocop
  ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /var/lib/gems/2.7.0 directory.

原因はubuntu-latetのデフォルトruby versionが 2.5.1から2.7.0に変わったこと。
https://github.com/actions/virtual-environments/issues/1816

reviewdoc.yaml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
         ruby-version: 2.6.5 #マイクロバージョンまで指定可能

こんな感じでyamlにrubyのバージョンを指定するようにすればOK
他に指定できるバージョンはこちらから参照可能
https://github.com/ruby/setup-ruby

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?