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

Doesn't work when Gemfile isn't in VS Code workspace root #1626

Closed
1 task done
nicolasrouanne opened this issue May 25, 2023 · 2 comments
Closed
1 task done

Doesn't work when Gemfile isn't in VS Code workspace root #1626

nicolasrouanne opened this issue May 25, 2023 · 2 comments
Labels
bug Something isn't working transferred This issue was transferred from vscode-ruby-lsp

Comments

@nicolasrouanne
Copy link

nicolasrouanne commented May 25, 2023

Operating System

Mac OS

Ruby version

3.2.2

Project has a bundle

  • Has bundle

Ruby version manager being used

rvm

Description

My VS Code workspace is a src folder with a web and api subfolders:

  • web is a React app
  • api is a Rails API, where my Gemfile.lock is located

It has the following structure

├src
│   ├── web
│   ├── api
│   │     ├── Gemfile.lock

When my VSCode workspace folder is the src directory (with no Gemfile.lock at root). When opening it like that, the formatter is set to none, ruby-lsp doesn't seem to find rubocop, which is part of my Gemfile.

group :development do
  gem 'rubocop', require: false
end

When I open VSCode directly in the api folder , ruby-lsp and the rubocop formatter work fine.

@nicolasrouanne nicolasrouanne added the bug Something isn't working label May 25, 2023
@Guistoff081
Copy link

having same problem here, the solution was to add gem 'ruby-lsp', '~> 0.5.1' to project gemfile yet it is not recommended

@nicolasrouanne nicolasrouanne changed the title Doesn't work in a monorepo where Gemfile and .ruby are in a subfolder Doesn't work when Gemfile isn't in VS Code workspace root Jun 20, 2023
@vinistock
Copy link
Member

Closing this based on the discussion Shopify/vscode-ruby-lsp#655 (comment). We will tackle #1510 instead which should also allow this to work.

@vinistock vinistock closed this as not planned Won't fix, can't repro, duplicate, stale Jul 20, 2023
@vinistock vinistock added the transferred This issue was transferred from vscode-ruby-lsp label Mar 15, 2024
@vinistock vinistock transferred this issue from Shopify/vscode-ruby-lsp Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transferred This issue was transferred from vscode-ruby-lsp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants