Rubymine does not detect gems from Gemfile installed with bundle install on docker-compose

Completed

Gemfile:

source "https://rubygems.org"

gem "roda", "~> 3.33"
gem "iodine", "~> 0.7.40"
gem "sequel", "~> 5.33"

Dockerfile:

FROM ruby:2.7.1-alpine3.12

WORKDIR /app

Docker-compose:

version: "3.7"
services:
ruby:
build:
dockerfile: Dockerfile
context: .
volumes:
- .:/app:cached
- bundle:/usr/local/bundle
ports:
- '9292:9292'

volumes:
bundle:

Steps for replay:

  1. docker-compose build
  2. docker-compose ruby bundle install
  3. Add remote interpreter from docker-compose in `Ruby SDK and Gems`

Rubymine does not detect gems from Gemfile installed with bundle install

However, he defines gems from the standard library

The command `bundle list` from docker container show that's gems from Gemfile are installed.

I noticed that before these changes in the definition of Dockerfile the list of gems was determined correctly.

Although when I determine on my own BUNDLE_PATH env it don't help me.

3 comments
Comment actions Permalink

Hello Aleksei,

I've checked in RubyMine 2020.2 EAP your steps although needed to change Dockerfile a bit (adding certain packages because bundle install was failing): after adding Ruby SDK, gems from the Gemfile were listed in the External Libraries node (they're also listed in Settings -> Ruby SDK and Gems). Were your steps the same or did I miss something?

0
Comment actions Permalink

Hello Olga,

Thank you for your help! I tried to reproduce this issue with the latest rubymine update, it stopped reproducible with the same settings and the same docker container. Everything is working as expected for now.

0
Comment actions Permalink

Hello Aleksei,

good to know that. Thank you for the update!

0

Please sign in to leave a comment.