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

gem bootstrap: Working Directory's Template Directory Not Loaded #96

Open
sshaw opened this issue May 6, 2020 · 4 comments
Open

gem bootstrap: Working Directory's Template Directory Not Loaded #96

sshaw opened this issue May 6, 2020 · 4 comments

Comments

@sshaw
Copy link

sshaw commented May 6, 2020

From the docs:

Templates in the first existing one of these directories will always be used to create additional files:

./.gem-release/default (local)
~/.gem-release/default (global)

But:

~/code/ruby >gem list gem-release

*** LOCAL GEMS ***

gem-release (2.1.1)
~/code/ruby >tree ./.gem-release/
./.gem-release/
└── default
    ├── foo.txt
    └── gemspec

1 directory, 2 files
~/code/ruby >ll -d ~/.gem-release
ls: /Users/sshaw/.gem-release: No such file or directory
~/code/ruby >gem bootstrap testing

Scaffolding gem testing
Creating .gitignore
Creating Gemfile
<snip output>
~/code/ruby >tree testing/
testing/
├── Gemfile
├── LICENSE.md
├── lib
│   ├── testing
│   │   └── version.rb
│   └── testing.rb
└── testing.gemspec

No foo.txt and my gemspec template was not used.

Works fine when the directory is at ~.

@PikachuEXE
Copy link
Collaborator

It seems like the files need to be in the target folder
So if you want gem bootstrap testing to use custom template
Place them in /code/ruby/testing/.gem-release

@sshaw
Copy link
Author

sshaw commented May 9, 2020

It seems like the files need to be in the target folder
So if you want gem bootstrap testing to use custom template
Place them in /code/ruby/testing/.gem-release

From a usage point of view this does not make much sense:

  1. I'm trying to create a new gem so the directory does not exists
  2. Anything in the gem bootstrap target directory gets added to a git repo

The use case where it exists in a parent directory makes more sense, for example if you have directory for work related code, you don't want to use ~/.gem-release.

@PikachuEXE
Copy link
Collaborator

PikachuEXE commented May 11, 2020

You are gonna have to ask @svenfuchs to see what he thinks

@sroller
Copy link

sroller commented Nov 22, 2024

I have the same problem. I was trying for quite some time to make it work. I'm glad I found it's not me. I guess I have to ask Claude.ai to write it for me :-).

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

4 participants
@sshaw @sroller @PikachuEXE and others