Skip to content

Extension uses system Ruby version - can't start Solargraph #169

@semaperepelitsa

Description

@semaperepelitsa

I am having trouble running Solargraph on my system. After opening the app, I am getting this error:

Language server solargraph:

from extension "Ruby" version 0.13.1: Failed to install gem 'solargraph': Gem command failed (status: 1)
Error: ERROR:  Error installing solargraph:
	There are no versions of prism (~> 1.4) compatible with your Ruby & RubyGems. Maybe try installing an older version of the gem you're looking for?
	prism requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.

The version mentioned here (2.6.10.210) is the one bundled with the latest MacOS. In my shell I have a script that automatically adds project-specific Ruby version to the PATH. I don't know how to make it work for Zed. In other editors (Sublime Text, VSCode) I could configure a custom path to Ruby binary, which has worked fine.

I am quite surprised that the documentation here does not mention this topic at all. Am I supposed to use the system Ruby version? Or is it supposed to support all popular Ruby version managers out-of-the-box? When I start a built-in Terminal panel, it does pick up the appropriate Ruby version correctly. I don't know how to debug it, is there any special verbose mode where I can see how exactly is it trying to run solargraph?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions