A troublesome story when deleting the gems file created in the gem development directory.

!Mac OS X-10.13.3!ruby-2.7.0p0

Introduction

When I was making a gem called qiita \ _org in my graduation research, I got an issue saying that'gems directory is included', so I tried to delete it. Make a note of any problems you may have at this time.

About the trouble.

The beginning of this case.

The following issue came from mensfeld.

While reviewing the changes for this lib, I noticed, that the vendor/gems directory is being included.

Is this needed? Usually, it's added by mistake and causes:
a) confusion
b) problems when tracking changes
c) makes gem much bigger than it could be

ref: https://github.com/yamatoken/qiita_org/tree/master/gems/ruby/2.7.0

If the presence of vendor data is valid I would love the reasoning. Thanks!

I was a beginner in ruby ​​and gem development, and I had never thought about this, and I learned a lot, so I tried to delete the gems directory that had been created before I knew it.

What I did.

After erasing it, I tried the post command of qiita \ _org just in case, and it became as follows.

Bundler could not find compatible versions for gem "command_line":
  In Gemfile:
    qiita_org was resolved to 0.1.35, which depends on
      command_line (> 2.0.0)

Could not find gem 'command_line (> 2.0.0)', which is required by gem 'qiita_org', in any of the sources.

For the time being, when I did'bundle update', the gems directory that should have been deleted was restored.

About the cause

Even if you erase it with rm, it will be restored, and even if you do not upload gems to Github with .gitignore, it will rise without permission.

The cause was in .bundle/config.

.bundle/config


BUNDLE_PATH: "gems"

Because there was such a thing, the gems directory was generated.

Erase this and solve.


Recommended Posts

A troublesome story when deleting the gems file created in the gem development directory.
The story when the test folder was not created in Rails
A little troublesome story in Groovy
I examined the file created when selecting Empty Activity in Android Studio
The story of forgetting to close a file in Java and failing
Memo: [Java] If a file is in the monitored directory, process it.
A story about the JDK in the Java 11 era
About the solution of the error that occurred when trying to create a Japanese file of devise in the Docker development environment
How to save a file with the specified extension under the directory specified in Java to the list
Access the war file in the root directory of Tomcat
When a Java file created with the Atom editor is garbled when executed at the command prompt
About the behavior when doing a file map with java
A story that made me regret when a "NotReadablePropertyException" occurred during the development of the Spring Boot application.