Make a note for latecomers about how to deal with errors when rewriting the gemfile.
windows 10 home ubuntu 20.04 LTS ruby 2.7.1 Rails 6.0.3 postgresql 11
$ bundle
~~~~~ Omitted ~~~~~
Permission denied @ rb_sysopen - /home/admin0/taskleaf2/Gemfile (Errno::EACCES)
~~~~~ Omitted ~~~~~
was an error while trying to read from `/home/admin0/taskleaf2/Gemfile`. It is likely that you need to grant read permissions for that path. (Bundler::PermissionError)
~~~~~ Omitted ~~~~~
Bundler::Dsl::DSLError
There is no particular reason this time, but when I searched by focusing on the third error sentence, the following site described a good solution, so I will try it. https://stackoverflow.com/questions/57926553/bundle-install-gives-bundlerdsldslerror
$ chmod 644 Gemfile
Now that the error no longer occurs, it is determined that the problem has been resolved.
Recommended Posts