[RUBY] How to deal with Bundler :: Dsl :: DSLError by rewriting gemfile

Make a note for latecomers about how to deal with errors when rewriting the gemfile.

Development environment

windows 10 home ubuntu 20.04 LTS ruby 2.7.1 Rails 6.0.3 postgresql 11

Error statement

$ 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

How to deal with Bundler :: Dsl :: DSLError by rewriting gemfile
[Android] How to deal with dark themes
How to deal with Precompiling assets failed.
[Rails] How to search by multiple values ​​with LIKE
Diet program with preprocessor (how to deal with i-appli size)
How to deal with No template for interactive request
[Docker environment] How to deal with ActiveSupport :: MessageEncryptor :: InvalidMessage
[Rails] How to deal with URL changes after render
How to boot by environment with Spring Boot of Maven
Common problems with WSL and how to deal with them
[Docker + Rails] How to deal with Rails server startup failure
How to deal with the error ERROR: While executing gem ... (Gem :: FilePermissionError)
How to deal with different versions of rbenv and Ruby
[Rails / RSpec] How to deal with element has zero size error
How to deal with 405 Method Not Allowed error in Tomcat + JSP
Android: How to deal with "Could not determine java version from '10 .0.1'"
Project facet Java version 13 is not supported. How to deal with
How to scroll horizontally with ScrollView
How to enclose any character with "~"
How to use mssql-tools with alpine
How to get along with Rails
How to start Camunda with Docker
twitter-4 selections of certain errors with Twitter login function created by omniauth gem and how to deal with them
[Rails] How to log in with a name by adding a devise name column
Java8 / 9 Beginners: Stream API addiction points and how to deal with them
How to crop an image with libGDX
How to prevent duplicate processing by addEventListener
How to share files with Docker Toolbox
[Java] How to compare with equals method
How to use BootStrap with Play Framework
[Rails] How to use rails console with docker
How to switch thumbnail images with JavaScript
[Note] How to get started with Rspec
How to do API-based control with cancancan
How to achieve file download with Feign
How to update related models with accepts_nested_attributes_for
How to set JAVA_HOME with Maven appassembler-maven-plugin
How to implement TextInputLayout with validation function
How to delete data with foreign key
[Easy] How to upgrade Ruby and bundler
How to test private scope with JUnit
How to monitor nginx with docker-compose with datadog
How to achieve file upload with Feign
How to run Blazor (C #) with Docker
How to build Rails 6 environment with Docker
[Rails6] How to connect the posting function generated by Scaffold with the user function generated by devise
[Laravel] How to deal with out of memory error when composer require [Docker]
How to output jar with main class specified by gradle in Intellij IDEA