TEAMCIY_RAKE_TU_AUTORUNNER_PATH: "/usr/local/lib/ruby/gems/2.7.0/gems/test-unit-3.3.4/lib/test/unit/autorunner.rb" RUBYMINE_TESTUNIT_REPORTER: "/opt/.rubymine_helpers/rb/testing/patch/testunit" TEAMCITY_RAKE_RUNNER_USED_FRAMEWORKS: ":test_unit :shoulda " \ -time-limit 100 -memory-limit 0 -rubymine-protocol-extensions -port 1234\ \ -key-value -disable-int-handler -evaluation-timeout 10 -evaluation-control\ "/usr/local/bin/ruby /usr/local/bundle/gems/ruby-debug-ide-0.7.2/bin/rdebug-ide\ It first loads my docker-compose file and then overrides values with its own docker-compose.override.3.yml: version: "3.9" See the full line when bringing up docker containers for Sinatra debugging: /usr/bin/docker-compose -f /home/jamie/repos/experiments/sinatra-rubymine/docker-compose.yml -f /home/jamie/.cache/JetBrains/RubyMine2020.3/tmp/docker-compose.override.3.yml up -exit-code-from web -abort-on-container-exit web When bringing up your docker containers, RubyMine adds some overrides. Why do/don’t I need to map additional ports for debugging? # I put up a sample Sinatra app that’s set up for debugging on GitHub. Debugging should then work as normal, assuming you have the gems and other setup done. The fix is simply clicking “Add Configuration” and selecting a template in the case of Sinatra, for example, I’d select “Rack”, modify any options and click “Create configuration”. This may not be the case for other frameworks, or no framework at all. When RubyMine detects Rails, it automatically sets up run/debug configurations. Sadly, I ran into a lot of issues setting this up across different projects. When the breakpoint is hit, you’re presented with a rich, visual debugger. Add a breakpoint somewhere by clicking in the gutter and start debugging by clicking on the little green bug icon. You can have RubyMine do this for you, or simply docker-compose run web bundle. Having set up the correct interpreter, you’ll get autocompletion, documentation and jump actions across your codebase and gems.ĭebugging support requires two gems to be added to your Gemfile: group :development, :test do 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
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |