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

Install problem on Mac: Suggestion #248

Closed
jgclark opened this issue Nov 26, 2019 · 3 comments
Closed

Install problem on Mac: Suggestion #248

jgclark opened this issue Nov 26, 2019 · 3 comments

Comments

@jgclark
Copy link

jgclark commented Nov 26, 2019

(Edited)
I'm sorry this is probably really basic, but I couldn't get the first step of installation to work.
gem install solargraph gives errors:

ERROR:  Error installing solargraph:
	ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20191126-8244-132ryat.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.

More googling around and trying other things means I've now fixed it. But for the benefit of others, could you improve the documentation, adding that (for macOS) xcode-select --install is required? Then the slightly unhelpful error message shouldn't become a problem. Thanks.

@jgclark jgclark changed the title Install problem on Mac Install problem on Mac: Suggestion Nov 26, 2019
@castwide
Copy link
Owner

Documenting this issue is a good idea. It isn't specific to Solargraph, but it comes up often enough to have a FAQ entry, at least.

Related: castwide/vscode-solargraph#78

@kirichkov
Copy link

Actually, after upgrading to Mojave, xcode-select --install didn't help. Apparently Apple stopped shipping (some of) the C header files for ruby, and split them in a separate package. To resolve this you'd also need to install them:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

On Catalina I presume (not confirmed) you'd need:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.15.pkg

@castwide
Copy link
Owner

castwide commented May 9, 2020

Documented in the troubleshooting FAQ with brief instructions and a link back to GitHub.

@castwide castwide closed this as completed May 9, 2020
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

3 participants