
Note that it won’t stop them when closing the project. RubyMine will keep your main container and any it depends on running whilst the project is open. If not, check that you’re not running any other containers that might conflict, and that you’ve told RubyMine to bring the containers up if they’re not running (see the “Ruby Docker Integration"settings page. If all is well, RubyMine will start your container and you should see a background task kick off to index your gems. If anyone at JetBrains is reading, this would be a candidate for improvement. Try to make a habit of double-checking this with docker ps and bringing them down before clicking “OK”. This means that another, unrelated docker container will be running, whose ports may conflict. Note that if you’ve already added remote interpreters for other projects, RubyMine might try to use one of those when you first open the new project. That interpreter will be added to the list 1. Click OK and you should see a couple of progress indicators fly by. RubyMine should pre-fill most fields here, but you’ll need to select the “Service” - or container - that your rails server is running inside. Click the “+” and select “Docker Compose”. Head to Settings ▸ Languages & Frameworks ▸ Ruby SDK and Gems. The first step is to set the correct Ruby interpreter, which lives in our Docker container. Now stop those containers and open the project in RubyMine. Running docker-compose up and navigating to localhost:3000 shows me the standard Rails welcome page.
#RUBYMINE DOCKER INSTALL#
RUN apt-get update -qq & apt-get install -y postgresql-clientĬommand: bash -c "rm -f tmp/pids/server.pid & bundle exec rails s -p 3000 -b '0.0.0.0'" Let’s start with a basic Rails API project with two containers: one for the app and one for the DB. Unfortunately I had some problems setting up Ruby/Rails projects running in Docker containers to work with RubyMine’s debugging features, so I’ve documented how I did it and some of the issues I ran into. This time I’m making a concerted effort to learn its feature set and make them work for me, and so far I’m thoroughly impressed. I’ve played around with it in the past, but always ended up back on vim for various reasons.

Lately I’ve been experimenting with RubyMine.
