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

Support for running within docker #30

Open
thisismydesign opened this issue Sep 17, 2024 · 2 comments
Open

Support for running within docker #30

thisismydesign opened this issue Sep 17, 2024 · 2 comments

Comments

@thisismydesign
Copy link

I develop in docker and not on my host and was hoping I could just do this:
settings.json

{
  "rubocop.commandPath": "docker-compose exec web bundle exec rubocop"
}

The extensions doesn't load because it tries to run bundle and fails due to gems not being installed:
[client] Command bundle list --name-only failed with exit code 1 (exec options: {"cwd":"/Users/csaba/workspace/adspective/platform"})

This seems like an unnecessary dependency, or at least it could handle it gracefully.

@unikitty37
Copy link

This looks similar to the issue I'm having.

I'm running in a devcontainer, and if I set rubocop_mode to enableViaGemfile I get this in the output and nothing works:

client] Restarting language server...
[client] Disabling RuboCop extension, because rubocop isn't included in the bundle

It seems the extension is not looking in the devcontainer and is trying to check the bundle locally; rubocop will only run if I set rubocop_mode to enableUnconditionally.

@beltrachi
Copy link

beltrachi commented Dec 21, 2024

I faced the same issue. When Rubocop mode is Run unless bundler excludes rubocop, it triggers a bundler command (bundle list --name-only ) on a bundle that is not the one in docker-compose.

Workaround that worked for me:

  1. Choose Always run in Rubocop mode.
  2. Set command path docker-compose run web bundle exec rubocop (you should use your command, it's just to give an example).

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