ruby-on-railsrubydockerbundlerrubymine

RubyMine doesn't see gems from bundle in Docker on Mac OS


I'm using a Docker image with some specified environmental variables, such as GEM_HOME and BUNDLE_PATH.

RubyMine connects to the remote Docker SDK just fine, but I can't see gems added by bundler, even though bundler itself is there. My profiler can't configure the project because of that, so I am forced to start all tasks and servers from the Terminal.

Ruby SDK and Gems

How do I make my bundle gems visible?


UPD

It actually has a deal with custom bundle gems path. After it was changed, gems disappeared from gem list. RubyMine takes gems from there, so it can't find those gems.

Does anybody know how to make gem list with bundler custom gems path?


UPD 2

Even after adding bundle gems to gem list I'm having the same issue :(


Solution

  • I also struggled with the same problem.

    Managed to fix it by setting this parameters in ~/.zshc user profile.

    You might have different RUBY_PATH, feel free to change it.

    export RUBY_PATH=/usr/local/opt/ruby/bin
    export PATH="$RUBY_PATH:$PATH"
    export RUBY_VERSION=$($RUBY_PATH/ruby -e "puts RUBY_VERSION")
    export PATH="/usr/local/lib/ruby/gems/$RUBY_VERSION/bin:$PATH"
    export GEM_HOME="$HOME/.gem"
    export GEM_PATH="$GEM_HOME/ruby/$RUBY_VERSION"
    

    You can also take it from this gist