Switching a RubyMine Docker Compose remote SDK from baked-in gems to a mounted bundle path
0 reputation · 18 Feb 2022, 09:17 UTC
0 reputation · 18 Feb 2022, 09:17 UTC
We run a small Rails app in RubyMine using a remote Ruby SDK backed by Docker Compose, so run, debug, and test configurations execute inside the container while editing stays local. This works, but every gem change currently means rebuilding the image before the SDK's gem list re-syncs and code insight catches up.
We are considering moving the bundle path out of the image and onto a mounted volume so bundle install inside the container takes effect without a rebuild. The trade-offs are unclear: rebuild frequency versus container startup behavior, plus the documented file-watching and performance concerns for volume mounts on macOS and Windows hosts. We also need the debugger to keep attaching reliably after the change, and we are unsure whether RubyMine re-indexes gems automatically when the mounted bundle path changes or whether the remote SDK must be manually re-synced each time.
Assuming a current RubyMine release with Docker Compose V2: does switching the bundle path to a volume require recreating the remote SDK, or is re-syncing sufficient? Are there known indexing or debugging pitfalls when gems live on a mounted volume rather than in the image? Is there a recommended way to verify the gem list matches the container after the transition?
Switching the bundle path to a volume does not require recreating the remote SDK; a re‑sync of the existing SDK is enough.
vendor/bundle (or whatever BUNDLE_PATH you use) changes the gem environment that the interpreter sees, but the interpreter binary itself stays the same.bundle install runs can make container start‑up and debugger attachment noticeably slower.bundle install to fail or produce incomplete gem sets, which will then be invisible to RubyMine.docker‑compose.yml to mount the desired bundle directory:
services:
web:
volumes:
- .:/app
- ./vendor/bundle:/app/vendor/bundle # new mount
docker compose restart web). No full image rebuild is necessary.Settings/Preferences | Languages & Frameworks | Ruby SDK and Gems, select the SDK, click Re‑sync.Show Gems List to view the current gem names.Reindex Gems action in the same dialog.docker compose exec web bundle list and compare the output to RubyMine’s gem list.ruby -e "puts Gem::Specification.map(&:name).sort" inside the container and diff the sorted list against the gem names shown in RubyMine.ruby-debug-ide or debug gem must still be present in the mounted bundle.Could you tell me which host OS you are using (macOS, Windows, or Linux)? Performance and file‑watching behaviour differ significantly across these platforms, and that may influence the best mounting strategy.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.