Skip to content

[client] No Gemfile found in the current workspace #22

@zal-lex

Description

@zal-lex

Getting this error on opening VS Code.

I think the problem is in the project structure. It is a git repo with several folders. The backend with the rails app is one of several folders.

.git repo
├── rails-app
          ├── app
          ├── ...
           .rubocop.yml
           ...
           Gemfile
           Gemfile.lock
           ...
├── another-folder
├── one-more-folder
.gitignore
README.md
...

The Gemfile is in the rails-app folder. I need to have open full git repo with all folders simultaneously.
It would be great to have a setting to pass the Gemfile path for the project/workspace

Full log:

[client] No Gemfile found in the current workspace
[client] Starting language server: rubocop --lsp
[server] RuboCop 1.54.1 language server initialized, PID 40280
cannot load such file -- rubocop-rspec
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/feature_loader.rb:46:in `rescue in rescue in load'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/feature_loader.rb:39:in `rescue in load'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/feature_loader.rb:32:in `load'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/feature_loader.rb:21:in `load'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_loader_resolver.rb:14:in `block (2 levels) in resolve_requires'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_loader_resolver.rb:13:in `each'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_loader_resolver.rb:13:in `block in resolve_requires'
<internal:kernel>:90:in `tap'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_loader_resolver.rb:12:in `resolve_requires'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_loader.rb:53:in `load_file'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_loader.rb:112:in `configuration_from_file'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_store.rb:68:in `for_dir'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/config_store.rb:58:in `for'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/target_finder.rb:190:in `block in process_explicit_path'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/target_finder.rb:189:in `reject'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/target_finder.rb:189:in `process_explicit_path'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/target_finder.rb:40:in `block in find'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/target_finder.rb:36:in `each'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/target_finder.rb:36:in `find'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/runner.rb:111:in `find_target_files'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/runner.rb:68:in `run'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/runtime.rb:78:in `run_rubocop'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/runtime.rb:51:in `block in offenses'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/server/helper.rb:26:in `redirect'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/runtime.rb:70:in `redirect_stdout'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/runtime.rb:51:in `offenses'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/server.rb:53:in `offenses'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/routes.rb:195:in `diagnostic'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/routes.rb:84:in `block in <class:Routes>'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/server.rb:34:in `call'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/server.rb:34:in `block in start'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/transport/io/reader.rb:20:in `read'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/lsp/server.rb:30:in `start'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli/command/lsp.rb:14:in `run'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli/command.rb:11:in `run'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli/environment.rb:18:in `run'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli.rb:118:in `run_command'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli.rb:184:in `handle_exiting_options'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli.rb:158:in `act_on_options'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli.rb:47:in `block in run'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli.rb:77:in `profile_if_needed'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/lib/rubocop/cli.rb:43:in `run'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/exe/rubocop:19:in `block in <top (required)>'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/rubocop-1.54.1/exe/rubocop:19:in `<top (required)>'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/bin/rubocop:25:in `load'
/Users/zalyotov/.asdf/installs/ruby/3.1.4/bin/rubocop:25:in `<main>'
[Error - 16:24:35] Client RuboCop: connection to server is erroring. Shutting down server.
[Error - 16:24:35] Connection to server got closed. Server will not be restarted.
[Error - 16:24:35] Stopping server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 16:24:35] Stopping server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions