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

[bug] Macos Sequoia 15.2 error installing CRuby sources: sh: etags: command not found #135

Open
tlubz opened this issue Jan 24, 2025 · 0 comments

Comments

@tlubz
Copy link

tlubz commented Jan 24, 2025

When installing CRuby sources in pry, I get this error:

[2] pry(main)> require 'pry-doc'
=> true
[3] pry(main)> show-method Time.new
Identifier not found - do you want to install CRuby sources to attempt to resolve the identifier there?
This allows the lookup of C internals Y/N y
Downloading and setting up Ruby 3_2_5 source...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 15.0M    0 15.0M    0     0  2553k      0 --:--:--  0:00:06 --:--:-- 2896k
Generating tagfile!
sh: etags: command not found
Error: find . -type f -name '*.[chy]' | etags - --no-members

digging into this, lib/pry-doc/pry_ext/show_source_with_c_internals/ruby_source_installer.rb:35 has this line:

self.etag_binary = linux? ? File.join(PryDoc.root, "libexec/linux/etags-#{arch}") : "etags"

in this case, it looks like it assumes that the etags binary is installed globally. however it does not appear to be shipped with macos.

I was able to get it working by installing Emacs with brew install emacs, but I don't think pry-doc should depend on a big distro like that. On macos, a descriptive error message, documentation, or other way to pull in the dependency would be preferable to the command not found error.

Also i'm not sure that emacs is the best way to get the etags binary. If there's a better source for macos, that would be preferable.

Platform: macos version 15.2
Ruby 3.2.6
pry-0.14.2
pry-doc-1.5.0

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

1 participant