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

Fails with Errno::EACCES: Permission denied @ rb_sysopen if vendor files are read-only #133

Open
h3xx opened this issue Apr 11, 2024 · 1 comment

Comments

@h3xx
Copy link

h3xx commented Apr 11, 2024

I think this issue stems from the fact this library does not clear out the coverage directory before it runs. If it simply removed the coverage directory before starting, it should fix this error.

Related issue: #134 -- when this one is fixed, that one will also likely be fixed.

Steps to repro:

rails new --skip-bootsnap temp
cd temp
bundle config set --local path 'vendor'
bundle add simplecov
printf 'require "simplecov"\nSimpleCov.start "rails"\n' >>test/test_helper.rb
chmod -R a-w vendor
bin/rails test
# Run tests again to produce the error
bin/rails test

The second rails test fails with the following error message:

Running 0 tests in a single process (parallelization threshold is 50)
Run options: --seed 46566

# Running:

Formatter SimpleCov::Formatter::HTMLFormatter failed with Errno::EACCES: Permission denied @ rb_sysopen - /tmp/ndz.eFIwFv/temp/coverage/assets/0.12.3/DataTables-1.10.20/images/sort_asc.png (/home/h3xx/.rbenv/versions/3.3.0/lib/ruby/3.3.0/fileutils.rb:2279:in `initialize')

Version info

  • Ruby version: 3.3.0
  • Rails version: 7.1.3.2
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

2 participants