Can't get Ruby's remoter interpreter to work with Docker - RubyMine (2019.1.2)

Answered

This features used to work for the past couple of months but recently after the last update, it does not work.

First, I can add Docker without any problems, but when I add the remote interpreter, it does not sync the gems. Here is the log

YYYY-MM-DD HH:MM:23,002 [37011855]   INFO - byRemoteInterpreterManagerImpl - Uploading helpers for Remote: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (docker-compose://[C:\Users\mahmo\Documents\sites\cartona\backend\docker-compose.yml]:backend-app//usr/local/bin/ruby) at Thread[AWT-EventQueue-0 2019.1.2#RM-191.7141.58 RubyMine, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 1.8.0_202-release-1483-b49,6,Idea Thread Group] 
YYYY-MM-DD HH:MM:23,002 [37011855] INFO - byRemoteInterpreterManagerImpl - Helpers uploaded for Remote: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (docker-compose://[C:\path-tod\docker-compose.yml]:app//usr/local/bin/ruby) at Thread[AWT-EventQueue-0 2019.1.2#RM-191.7141.58 RubyMine, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 1.8.0_202-release-1483-b49,6,Idea Thread Group]
YYYY-MM-DD HH:MM:23,521 [37012374] INFO - byRemoteInterpreterManagerImpl - Updating gems for Remote: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (docker-compose://[C:\path-tod\docker-compose.yml]:app//usr/local/bin/ruby)
YYYY-MM-DD HH:MM:24,832 [37013685] INFO - byRemoteInterpreterManagerImpl - Gems for Remote: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (docker-compose://[C:\path-tod\docker-compose.yml]:app//usr/local/bin/ruby) updated
YYYY-MM-DD HH:MM:24,832 [37013685] INFO - byRemoteInterpreterManagerImpl - Starting roots refresh for Remote: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (docker-compose://[C:\path-tod\docker-compose.yml]:app//usr/local/bin/ruby) (16 roots)
YYYY-MM-DD HH:MM:24,849 [37013702] INFO - byRemoteInterpreterManagerImpl - Roots refreshed for Remote: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (docker-compose://[C:\path-tod\docker-compose.yml]:app//usr/local/bin/ruby) (16 roots); Refreshing gems;

Docker file:

FROM ruby:2.5.5-alpine

RUN apk update --no-cache \
&& apk add --no-cache build-base \
nodejs \
postgresql-dev \
git \
tzdata \
less \
graphicsmagick \
vim \
&& rm -rf /var/cache/apk/*

RUN mkdir /app
WORKDIR /app
COPY . /app

ENV BUNDLE_PATH=/bundle \
BUNDLE_BIN=/bundle/bin \
GEM_HOME=/bundle
ENV PATH="${BUNDLE_BIN}:${PATH}"

RUN chmod +x /app/docker-entrypoint.sh
ENTRYPOINT ["/app/docker-entrypoint.sh"]

 

DockerCompose File:

version: '3.7'

services:
postgres:
image: 'postgres:10.3-alpine'
container_name: db
ports:
- '5432:5432'
volumes:
- postgres:/var/lib/postgresql/data
env_file:
- '.docker/app.env'

app:
depends_on:
- 'postgres'
build: .
container_name: app
ports:
- '5000:5000'
volumes:
- bundle:/bundle
- '.:/app'
env_file:
- '.docker/app.env'
stdin_open: true
tty: true

volumes:
bundle:
postgres:

 

Docker Server Version: 19.03.0-beta3
RubyMine 2019.1.2
Build #RM-191.7141.58, built on May 14, 2019
JRE: 1.8.0_202-release-1483-b49 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

8 comments

Hello,

would it be possible to provide app.env file as well or if possible a sample project for reproduce?

0

Sure, here it is

COMPOSE_PROJECT_NAME=app
ACTION_CABLE_ALLOWED_REQUEST_ORIGINS=http:\/\/localhost*
DB_HOST=postgres
POSTGRES_PASSWORD=myapp
POSTGRES_USER=my_app
POSTGRES_DB=my_app_development
RAILS_ENV=development
RAILS_SERVE_STATIC_FILES=true
RAILS_LOG_TO_STDOUT=true
0

Thank you, and also a docker-entrypoint.sh if possible (forgot to ask about it).

0

No worries, here it is:

#! /bin/sh

set -ex
PS4='$LINENO: '

for i in DOCKER_HOST TRUSTED_IP; do
  export ${i}=$(ip route show default | awk '/default/ {print $3}')
done

bin/bundle check || bin/bundle install --binstubs
rm -f /app/tmp/pids/server.pid
bin/rails db:migrate
bin/rails s -p 3000

exec "$@"
0

I just found the problem persists with WSL too!! I uninstalled RubyMine, deleted all .rubymine folders and re-installed it multiple times and nothing works!  Here is the log

 

2019-05-26 14:35:35,521 [ 785606] INFO - byRemoteInterpreterManagerImpl - Uploading helpers for Remote-rbenv: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (wsl://PENGWIN/home/user/.rbenv/versions/2.5.5/bin/ruby) at Thread[AWT-EventQueue-0 2019.1.2#RM-191.7141.58 RubyMine, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 1.8.0_202-release-1483-b49,6,Idea Thread Group] 
2019-05-26 14:35:35,522 [ 785607] INFO - byRemoteInterpreterManagerImpl - Helpers uploaded for Remote-rbenv: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (wsl://PENGWIN/home/user/.rbenv/versions/2.5.5/bin/ruby) at Thread[AWT-EventQueue-0 2019.1.2#RM-191.7141.58 RubyMine, eap:false, os:Windows 10 10.0, java-version:JetBrains s.r.o 1.8.0_202-release-1483-b49,6,Idea Thread Group]
2019-05-26 14:35:36,040 [ 786125] INFO - byRemoteInterpreterManagerImpl - Updating gems for Remote-rbenv: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (wsl://PENGWIN/home/user/.rbenv/versions/2.5.5/bin/ruby)
2019-05-26 14:35:39,007 [ 789092] INFO - byRemoteInterpreterManagerImpl - Gems for Remote-rbenv: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (wsl://PENGWIN/home/user/.rbenv/versions/2.5.5/bin/ruby) updated
2019-05-26 14:35:39,007 [ 789092] INFO - byRemoteInterpreterManagerImpl - Starting roots refresh for Remote-rbenv: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (wsl://PENGWIN/home/user/.rbenv/versions/2.5.5/bin/ruby) (12 roots)
2019-05-26 14:35:39,023 [ 789108] INFO - byRemoteInterpreterManagerImpl - Roots refreshed for Remote-rbenv: ruby-2.5.5-p157: ver.2.5.5p157 ( revision 67260) p157 (wsl://PENGWIN/home/user/.rbenv/versions/2.5.5/bin/ruby) (12 roots); Refreshing gems;
0

Please sign in to leave a comment.