-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
yard gems results in [error]: The file `./docs/yard_plugin.rb' could not be loaded: #1462
Comments
it might be help this workaround |
I’ve this exact same issue. |
Given that this is only reproducible with rbenv, I feel like this should be reported upstream to that project. YARD relies on the Lines 68 to 74 in e167846
In reality we're probably relying on the working directory here: YARD does actually switch the working directory when parsing a specific gem and thus Now unfortunately due to a lot of internals about the way load path works (complicated by whether or not Bundler is involved, as well as different versions of rubygems etc), I'm not entirely sure what exactly is not getting set correctly, but based on the lack of reproduction with a standard Ruby install, it seems as though That said, there are a few other workarounds you can glean from this: the easiest would be to use Another would be to cd into the directory above and type Hope that helps! (*): Understanding ruby load, require, gems, bundler and rails autoloading from the bottom up |
@lsegal I had this error on 2.7.6. I switched to another project in 2.7.3 and it works fine. Both use rbenv. |
FWIW, on macos with ruby 2.7.4 and rbenv,
Even following the workaround above and recommendations here, still the same issue.
And, interestingly, it also works fine for rbenv version 2.7.3 although there is no OK, it seems to be
Then, |
FWIW, I use rvm and was having this same problem. Using Doing the same as @marvingreenberg worked for me: ➜ gem which reek
/Users/chipkragt/.rvm/gems/ruby-3.1.3/gems/reek-6.1.4/lib/reek.rb
➜ mkdir /Users/chipkragt/.rvm/gems/ruby-3.1.3/gems/reek-6.1.4/docs
➜ touch /Users/chipkragt/.rvm/gems/ruby-3.1.3/gems/reek-6.1.4/docs/yard_plugin.rb After that, |
I had this same problem, but for me it was with Shoulda Matchers. I had to run:
|
These reports indicate third party issues that should probably be reported in the specific projects. |
As per troessner#1672 , Yard can't process Reek because `docs/yarn_plugin.rb` is missing. It's not included in the Gem, so this PR adds it to correct this error. This was reported upstream in lsegal/yard#1462, but it seems that it either wasn't, or people were happy enough with the workaround (touching the missing file in the Gem's installed location). The workaround doesn't work when using `asdf`/`mise` with [default Gems](https://mise.jdx.dev/lang/ruby.html#default-gems). If Yard's automatic documentation is enabled (`yard config --gem-install-yri`) then the Ruby build fails.
As per troessner#1627, Yard can't process Reek because `docs/yarn_plugin.rb` is missing. It's not included in the Gem, so this PR adds it to correct this error. This was reported upstream in lsegal/yard#1462, but it seems that it either wasn't, or people were happy enough with the workaround (touching the missing file in the Gem's installed location). The workaround doesn't work when using `asdf`/`mise` with [default Gems](https://mise.jdx.dev/lang/ruby.html#default-gems). If Yard's automatic documentation is enabled (`yard config --gem-install-yri`) then the Ruby build fails.
As per troessner#1627, Yard can't process Reek because `docs/yarn_plugin.rb` is missing. It's not included in the Gem, so this PR adds it to correct this error. This was reported upstream in lsegal/yard#1462, but it seems that it either wasn't, or people were happy enough with the workaround (touching the missing file in the Gem's installed location). The workaround doesn't work when using `asdf`/`mise` with [default Gems](https://mise.jdx.dev/lang/ruby.html#default-gems). If Yard's automatic documentation is enabled (`yard config --gem-install-yri`) then the Ruby build fails.
As per troessner#1627, Yard can't process Reek because `docs/yarn_plugin.rb` is missing. It's not included in the Gem, so this PR adds it to correct this error. This was reported upstream in lsegal/yard#1462, but it seems that it either wasn't, or people were happy enough with the workaround (touching the missing file in the Gem's installed location). The workaround doesn't work when using `asdf`/`mise` with [default Gems](https://mise.jdx.dev/lang/ruby.html#default-gems). If Yard's automatic documentation is enabled (`yard config --gem-install-yri`) then the Ruby build fails.
As per troessner#1627, Yard can't process Reek because `docs/yarn_plugin.rb` is missing. It's not included in the Gem, so this PR adds it to correct this error. This was reported upstream in lsegal/yard#1462, but it seems that it either wasn't, or people were happy enough with the workaround (touching the missing file in the Gem's installed location). The workaround doesn't work when using `asdf`/`mise` with [default Gems](https://mise.jdx.dev/lang/ruby.html#default-gems). If Yard's automatic documentation is enabled (`yard config --gem-install-yri`) then the Ruby build fails.
Marking this as closed. |
Steps to reproduce
I run
yard gems
and it gives the following error:❯ yard -v
yard 0.9.28
❯ yard gems
[error]: The file `./docs/yard_plugin.rb' could not be loaded:
cannot load such file -- ./docs/yard_plugin.rb
I tried to reinstall ruby/yard/no-cache , and I looked up stackoverflow for the error but no leads at all, I am trying to make it work for Solargraph to provide intellisense for the gems
Thanks for the help
The text was updated successfully, but these errors were encountered: