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

bin/gemstash fails with Could not find command "readme" #396

Open
technicalpickles opened this issue Aug 3, 2024 · 5 comments
Open

bin/gemstash fails with Could not find command "readme" #396

technicalpickles opened this issue Aug 3, 2024 · 5 comments

Comments

@technicalpickles
Copy link
Contributor

This is specifically about running gemstash in development, but I'm able to do things like bin/gemstash start, but bin/gemstash or anything that would do help usage fails like:

❯ bin/gemstash                                                                                                                                                                                                  
Could not find command "readme".

This is the only place I can find readme mentioned:

command ||= "readme"
page = manpage(command)
if page && which("man")
exec "man", page
elsif page
puts File.read("#{page}.txt")
else
super
end

@olleolleolle
Copy link
Member

olleolleolle commented Aug 3, 2024

Perhaps the casing changed, and we need to support the uppercase README (md) file, here?

EDIT: no, the issue is that bundle exec rake doc when run, does not create .1 files, but .1.md files, in the man/ directory.

@technicalpickles
Copy link
Contributor Author

Forgot to post this, but I was able to confirm that running rake doc does create the files it's looking for, ie /Users/josh.nichols/workspace/gemstash/lib/gemstash/man/gemstash-readme.7

This is definitely specific to local development. I'm not sure what, if anything, should happen to read from the local files in this case 🤔

@olleolleolle
Copy link
Member

olleolleolle commented Aug 5, 2024

@technicalpickles Yeah, but it is a weird location to use, isn't it? lib/gemstash/man/ rather than man/, I mean. EDIT: It's the one we use.

@olleolleolle
Copy link
Member

@technicalpickles Thanks, coming back to this, perhaps the message could explain "if you're in local dev, please regenerate docs"?

@technicalpickles
Copy link
Contributor Author

Yeah, that makes sense to me 👍🏻 I was trying to think how you might determine that, and I think checking $0 == "bin/gemstash" might be the easiest way?

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

2 participants