-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Missing require statement -- Yard won't run on 1.8.6 or 7 #178
Comments
Can you a) show a backtrace Thanks |
Sorry, sure. marvin:ci waltd$ sudo yard gems So I figured, my Ruby must be too old to know each_slice, I've been meaning to upgrade, so I installed 1.8.7 -p302 and tried again: marvin:ruby-1.8.7-p302 waltd$ sudo yard gems Same error. A quick google turned up the solution to include enumerable, which I did directly in my gems directory, without doing any of the things that would have made a proper diff or fork and pull request possible, and yard works fine now. I'll go through the steps, and send you a pull request. It does seem odd that you hadn't encountered this already from someone else. Walter |
The second error is the same as the first (you're still running 1.8.6 there). You have to make sure your 1.8.7 install is before your OSX ruby in your path. It is a 1.8.6 error, since each_slice isn't in 1.8.6. I'd suggest upgrading, but this will get fixed, thanks. |
I beg to differ: arvin:ruby-1.8.7-p302 waltd$ which ruby That's the version that threw the second error, which stunningly looked just like the first one. I'm confused too. I'd restart my Mac, but I have too many other things open right now to do that. Thanks very much for looking at this. Walter |
Except that when gem installs executables it hooks them up to a specific ruby install. The path |
Here's a little docu on the requirement: http://apidock.com/ruby/Enumerable/each_slice |
Thanks, but that only works on 1.8.7-- 1.8.6 does not have Enumerable classes, and 1.9.1+ does not have "enumerable" (it's builtin). |
I uninstalled yard and re-installed it after I updated ruby, because I couldn't believe the error was exactly the same. And I updated gem in the process, too. |
marvin:ruby-1.8.7-p302 waltd$ gem which yard |
What does |
Here's the uninstall/reinstall (I just did it again) marvin:ruby-1.8.7-p302 waltd$ sudo gem uninstall yard in addition to the gem? [Yn] Y You have requested to uninstall the gem: RDoc failure in lib/yard/core_ext/hash.rb at or around line 13 column 11 Before reporting this, could you check that the file The internal error was: ERROR: While generating documentation for yard-0.6.1 RDoc failure in lib/yard/core_ext/hash.rb at or around line 13 column 11 Before reporting this, could you check that the file The internal error was: ERROR: While generating documentation for yard-0.6.1 And now that I have the unpatched version once more, let's see what happens if I run the yard gems again: marvin:ruby-1.8.7-p302 waltd$ sudo yard gems once more, into the breach... |
Well I'll be. Gem says it's using 1.8.6. WTF? marvin:ruby-1.8.7-p302 waltd$ gem env
|
:) |
I have tried three times now to re-install gem with the new ruby, being as explicit as I know how to be with the installer, and each time gem env says the same thing. I wonder what could be going on here? |
Restarting woke gem up to the new world order. |
Replace #each_slice with 1.8.6 compatible iteration. Closed by d3f34f4 |
Here's what I needed to do to make it work:
--- gems.rb (saved version)
+++ (current document)
@@ -44,6 +44,7 @@
end
The text was updated successfully, but these errors were encountered: