bundler-cache feature breaks ruby-lsp and other default gem behavior
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- developer-experience, devops
Research direction
Reproduce the issue by running rails and ruby-lsp with and without the bundler-cache feature in the described Ruby 3.3.5 devcontainer environment. Inspect how the bundler-cache feature configures gem paths and command availability; done means both commands run successfully while bundler-cache remains enabled.
Written by the indexing model from the issue text.
Description
Love the boot time saves provided by bundler-cache but it breaks most default external gem behavior.
rails and other gems are not available on the command line after enabling bundler-cache as a feature
this prevents ruby-lsp and other common IDE add-ons from running correctly.
without bundler-cache feature:
vscode ➜ /workspaces/myapp (ad6c9fe7) $ rails
Beginning in Rails 4.....
vscode ➜ /workspaces/myapp (ad6c9fe7) $ ruby-lsp
server starts and everything works
with bundler-cache feature:
vscode ➜ /workspaces/myapp (ad6c9fe7) $ rails
bash: rails: command not found
vscode ➜ /workspaces/myapp (ad6c9fe7) $ ruby-lsp
Ruby LSP> Skipping custom bundle setup since /workspaces/myapp/.ruby-lsp/Gemfile.lock already exists and is up to date
Ruby LSP> Running bundle install for the custom bundle. This may take a while...
Ruby LSP> Command: (bundle check || bundle install) 1>&2
The Gemfile's dependencies are satisfied
bundler: failed to load command: ruby-lsp (/bundle/vendor/ruby/3.3.0/bin/ruby-lsp)
/bundle/vendor/ruby/3.3.0/gems/bundler-2.4.10/lib/bundler/rubygems_integration.rb:308:in `block in replace_bin_path': can't find executable ruby-lsp for gem ruby-lsp. ruby-lsp is not currently included in the bundle, perhaps you meant to add it to your Gemfile?
I'm not enough of a smarty to know the right fix for this. I'm assuming a modification of the gem paths needs to be done but I'm unsure of the best way to implement that change within this feature bundle.
Would love if anyone has and ideas or pointers on the right direction of a fix. Thank you all <3
environment: unchanged Dockerfile for ruby 3.3.5, activestorage, postgres-client, github-cli & node devcontainer features
- Dominant language
- Ruby
- Stars
- 107
- Forks
- 38
- Avg merge
- 7m
- Merged PRs (30d)
- 2
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rails/devcontainer
-
Find a way to release a new image for released Ruby versions automaticallyMay be free again @rafaelfranca claimed this 287 days ago, and no pull request is open. Open
rails/devcontainer#105 · 6 reactions · 1 assignee ·
All issues in rails/devcontainer
Similar issues
-
security
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
ds-drift
Difficulty 1/5 Under an hour Newbie friendliness 88/100
we-promise/sure#3934 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
simp/pupmod-simp-ssh#246 ·