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
Bundler 2.3.21 attempts to update PLATFORMS in Gemfile.lock on bundle exec, fails on read-only filesystem #5893
Comments
Mysteriously, in another of our apps, we had the |
Hei! This is more or less expected. When you run The solution on your side is to add the platform of your Linux server to the lockfile. If you enable frozen mode ( Regarding your last comment, yes, using Anyways, things actionable for us here:
|
Thanks so much for the clear explanation, this makes sense. I was not previously aware of BUNDLE_FROZEN, but it does indeed sound helpful in our environment. I will share this guidance on the platforms usage with our team. If you want to leave this issue open to address those items, I'm fine with that. |
This has also caused headaches for myself and my teams when using Ruby on AWS Lambda as the lambda filesystem is read only. I think I would also consider downgrading this error to a warning. Great tip on the |
I also noticed this ... I have to bundle install new gems, then bundle update. if I add a gem to gemfile and do bundle update like i usually do, it will remove platforms, yet the other way does not |
Describe the problem as clearly as you can
We run our apps with a read-only filesystem in a Docker container.
In many of our apps' Gemfile.lock, we have a
PLATFORMS
section that lists various platforms we use for development and deployment; we do not typically maintain this list ourselves. Example:As of Bundler 2.3.21, when we run our app using
bundle exec
, it attempts to write to Gemfile.lock to add the platform relevant for the current system (e.g. linux on the server). Because we're running in a read only file system, this fails with:Errno::EROFS: Read-only file system @ rb_sysopen - /app/Gemfile.lock
As a workaround, we have found that removing other platforms and adding the
ruby
platform to Gemfile.lock prevents the issue, but we don't really understand why, or if this is a good general solution.Did you try upgrading rubygems & bundler?
Yes :)
What were you expecting to happen?
Running
bundle exec
commands does not attempt to write to Gemfile.lock or any other files.What actually happened?
Errno::EROFS: Read-only file system @ rb_sysopen - /app/Gemfile.lock
If not included with the output of your command, run
bundle env
and paste the output belowCan provide this if needed.
The text was updated successfully, but these errors were encountered: