Docker on Windows, connection refused when invoking debugger

I'm attempting to get Rubymine 2017.3 working with the debugger and Docker for Windows, and am having an issue with the ruby-debug-ide gem being unable to connect back to Rubymine. I used the help documentation https://www.jetbrains.com/help/ruby/2017.3/configuring-remote-interpreters-via-docker-compose.html to configure Rubymine.

It appears that the ruby-debug-ide gem is attempting to connect on the docker private network, but Rubymine isn't listening on that ip.

Any suggestions on what I can try next? This is the only remaining issue I'm needing to address before I'm able to use Rubymine on Windows. Without using the debugger everything is working as intended.

Thank you!

/usr/local/bin/ruby -e at_exit{sleep(1)};$$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift) /usr/local/bundle/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 1234 --host 0.0.0.0 --dispatcher-port 26168 -- /opt/project/bin/rails server -b 0.0.0.0 -p 3000 -e development
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:1234
=> Booting Unicorn
=> Rails 5.1.2 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
I, [2017-11-28T01:28:11.682857 #1] INFO -- : listening on addr=0.0.0.0:3000 fd=14
I, [2017-11-28T01:28:11.683197 #1] INFO -- : worker=0 spawning...
I, [2017-11-28T01:28:11.684781 #1] INFO -- : worker=1 spawning...
I, [2017-11-28T01:28:11.686426 #1] INFO -- : worker=2 spawning...
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:34961
I, [2017-11-28T01:28:11.689450 #1] INFO -- : worker=3 spawning...
13: connection failed(1)
Exception: Connection refused - connect(2) for "172.18.0.1" port 26168
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `initialize'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `open'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `block in notify_dispatcher'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `times'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `notify_dispatcher'
/usr/local/bundle/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:112:in `block in start_control'
6 comments

Thanks for report, could you please attach Dockerfile, docker-compose.yml and Gemfile to reproduce the same environment. Also please attach idea.log (Help | Show Log in ...)

0

Here's the requested files. As a side note (and possibly related), I was not able to connect to the database container using the RubyMine SQL browser, stating that the host (db) could not be found.

idea.log:

2017-12-04 11:36:47,295 [ 0] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE STARTED ------------------------------------------------------ 
2017-12-04 11:36:47,310 [ 15] INFO - #com.intellij.util.ui.JBUI - User scale factor: 1.0
2017-12-04 11:36:47,310 [ 15] INFO - #com.intellij.util.ui.JBUI - System scale factor: 1.0 (IDE-managed HiDPI)
2017-12-04 11:36:47,318 [ 23] INFO - #com.intellij.idea.Main - IDE: RubyMine (build #RM-173.3727.132, 28 Nov 2017 01:47)
2017-12-04 11:36:47,319 [ 24] INFO - #com.intellij.idea.Main - OS: Windows 10 (10.0, amd64)
2017-12-04 11:36:47,319 [ 24] INFO - #com.intellij.idea.Main - JRE: 1.8.0_152-release-1024-b6 (JetBrains s.r.o)
2017-12-04 11:36:47,319 [ 24] INFO - #com.intellij.idea.Main - JVM: 25.152-b6 (OpenJDK 64-Bit Server VM)
2017-12-04 11:36:47,321 [ 26] INFO - #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dide.no.platform.update=true -Djb.vmOptionsFile=C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\RubyMine\ch-0\173.3727.132\bin\rubymine64.exe.vmoptions -Xbootclasspath/a:C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\RubyMine\ch-0\173.3727.132\lib\boot.jar -Didea.platform.prefix=Ruby -Didea.paths.selector=RubyMine2017.3 -XX:ErrorFile=C:\Users\user\java_error_in_rubymine_%p.log -XX:HeapDumpPath=C:\Users\user\java_error_in_rubymine.hprof
2017-12-04 11:36:47,322 [ 27] INFO - #com.intellij.idea.Main - ForkJoinPool.commonPool: java.util.concurrent.ForkJoinPool@765207d5[Running, parallelism = 7, size = 0, active = 0, running = 0, steals = 0, tasks = 0, submissions = 0]
2017-12-04 11:36:47,323 [ 28] INFO - #com.intellij.idea.Main - ext: C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\RubyMine\ch-0\173.3727.132\jre64\lib\ext: [access-bridge-64.jar, cldrdata.jar, dnsns.jar, jaccess.jar, jfxrt.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunmscapi.jar, sunpkcs11.jar, zipfs.jar]
2017-12-04 11:36:47,323 [ 28] INFO - #com.intellij.idea.Main - JNU charset: Cp1252
2017-12-04 11:36:47,361 [ 66] INFO - #com.intellij.idea.Main - JNA library (64-bit) loaded in 38 ms
2017-12-04 11:36:47,363 [ 68] INFO - penapi.util.io.win32.IdeaWin32 - Native filesystem for Windows is operational
2017-12-04 11:36:48,418 [ 1123] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor js-nashorn-support.xml
2017-12-04 11:36:48,629 [ 1334] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor uml-properties-support.xml
2017-12-04 11:36:48,630 [ 1335] INFO - llij.ide.plugins.PluginManager - Cannot find optional descriptor uml-java-support.xml
2017-12-04 11:36:49,038 [ 1743] INFO - llij.ide.plugins.PluginManager - 56 plugins initialized in 902 ms
2017-12-04 11:36:49,058 [ 1763] INFO - llij.ide.plugins.PluginManager - Loaded bundled plugins: CSS Support (173.3727.132), CVS Integration (11), CoffeeScript (2.0), Database Tools and SQL (173.3727.132), Docker integration (173.3727.132), EditorConfig (173.3727.132), Gherkin (999.999), Git Integration (8.1), GitHub (173.3727.132), HTML Tools (2.0), Haml (173.3727.132), IDEA CORE (173.3727.132), IntelliLang (8.0), JavaScript Debugger (1.0), JavaScript Intention Power Pack (0.9.4), JavaScript Support (1.0), Less support (173.3727.132), Markdown support (173.3727.132), Mercurial Integration (10.0), Perforce Integration (2.0), Performance Testing (173.3727.132), Puppet Support (173.3727.132), REST Client (173.3727.132), Remote Hosts Access (0.1), Ruby CSS Support Integration (173.3727.132), Ruby Code Coverage (173.3727.132), Ruby Cucumber support (173.3727.132), Ruby Database Support Integration (173.3727.132), Ruby Docker (VERSION), Ruby Haml Support Integration (173.3727.132), Ruby I18n Support Integration (173.3727.132), Ruby JavaScript Debugger Integration (173.3727.132), Ruby Puppet Support Integration (173.3727.132), Ruby Remote SDK Support (0.1), Ruby Slim Support Integration (173.3727.132), Ruby UML Support Integration (173.3727.132), Ruby WSL Support (173.3727.132), RubyMotion support (173.3727.132), SSH Remote Run (0.1), Sass support (173.3727.132), Settings Repository (173.3727.132), Slim (173.3727.132), Stylus support (999.999), Subversion Integration (1.1), Task Management (1.0), Terminal (0.1), TextMate bundles support (173.3727.132), Time Tracking (1.0), UML Support (1.0), Vagrant (173.3727.132), WSL Support (173.3727.132), YAML (173.3727.132), tslint (173.3727.132)
2017-12-04 11:36:49,059 [ 1764] INFO - llij.ide.plugins.PluginManager - Loaded custom plugins: AngularJS (173.3727.69), Elixir (6.6.0), NodeJS (173.3727.69)
2017-12-04 11:36:49,607 [ 2312] INFO - ellij.util.io.PagedFileStorage - lower=100; upper=500; buffer=10; max=705
2017-12-04 11:36:49,649 [ 2354] INFO - pl.local.NativeFileWatcherImpl - Starting file watcher: C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\RubyMine\ch-0\173.3727.132\bin\fsnotifier64.exe
2017-12-04 11:36:49,662 [ 2367] INFO - pl.local.NativeFileWatcherImpl - Native file watcher is operational.
2017-12-04 11:36:49,765 [ 2470] INFO - pi.util.registry.RegistryState - Registry values changed by user:
2017-12-04 11:36:49,765 [ 2470] INFO - pi.util.registry.RegistryState - dumb.aware.run.configurations = true
2017-12-04 11:36:50,138 [ 2843] INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=12, fontScale=0.0; restored: fontSize=12, fontScale=1.0
2017-12-04 11:36:50,502 [ 3207] INFO - .openapi.application.Preloader - Finished preloading com.intellij.ide.ui.OptionsTopHitProvider$Activity@566475e1
2017-12-04 11:36:50,543 [ 3248] INFO - til.net.ssl.CertificateManager - Default SSL context initialized
2017-12-04 11:36:50,651 [ 3356] INFO - rains.ide.BuiltInServerManager - built-in server started, port 63342
2017-12-04 11:36:50,686 [ 3391] INFO - gs.impl.UpdateCheckerComponent - channel: eap
2017-12-04 11:36:50,803 [ 3508] INFO - il.indexing.FileBasedIndexImpl - Index exts enumerated:35
2017-12-04 11:36:50,809 [ 3514] INFO - il.indexing.FileBasedIndexImpl - Index scheduled:6
2017-12-04 11:36:50,843 [ 3548] INFO - tellij.psi.stubs.StubIndexImpl - All stub exts enumerated:28
2017-12-04 11:36:50,844 [ 3549] INFO - tellij.psi.stubs.StubIndexImpl - stub exts update scheduled:0
2017-12-04 11:36:51,411 [ 4116] INFO - plication.impl.ApplicationImpl - 82 application components initialized in 3279ms
2017-12-04 11:36:51,429 [ 4134] INFO - .intellij.idea.IdeaApplication - App initialization took 4799 ms
2017-12-04 11:36:51,583 [ 4288] INFO - pl$FileIndexDataInitialization - Initialization done:773
2017-12-04 11:36:51,854 [ 4559] INFO - exImpl$StubIndexInitialization - Initialization done:270
2017-12-04 11:36:52,134 [ 4839] INFO - ction.BrowserConnectionManager - Browser connected: version 2.0.9, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
2017-12-04 11:36:52,174 [ 4879] INFO - .openapi.application.Preloader - Finished preloading com.intellij.openapi.actionSystem.impl.ActionPreloader@2f76ac2e
2017-12-04 11:36:52,272 [ 4977] INFO - pl.projectlevelman.NewMappings - VCS Root: [] - [<Project>]
2017-12-04 11:36:52,275 [ 4980] INFO - pl.projectlevelman.NewMappings - VCS Root: [Git] - [C:/Users/user/RubymineProjects/project-backend]
2017-12-04 11:36:52,526 [ 5231] INFO - com.intellij.ide.ui.UISettings - Loaded: fontSize=12, fontScale=1.0; restored: fontSize=12, fontScale=1.0
2017-12-04 11:36:52,783 [ 5488] INFO - management.pik.PikSdkRefresher - Refreshing sdks
2017-12-04 11:36:52,783 [ 5488] INFO - management.pik.PikSdkRefresher - rubies folder doesn't exist
2017-12-04 11:36:52,789 [ 5494] INFO - gement.rbenv.RbenvSdkRefresher - Refreshing sdks
2017-12-04 11:36:52,789 [ 5494] INFO - gement.rbenv.RbenvSdkRefresher - rbenv isn't supported by OS
2017-12-04 11:36:52,935 [ 5640] INFO - ellij.project.impl.ProjectImpl - 106 project components initialized in 1070 ms
2017-12-04 11:36:52,943 [ 5648] INFO - .openapi.application.Preloader - Finished preloading com.intellij.ide.ui.search.SearchableOptionPreloader@301ac8da
2017-12-04 11:36:53,210 [ 5915] INFO - .openapi.application.Preloader - Finished preloading com.intellij.codeInsight.completion.CompletionPreloader@6207ccf6
2017-12-04 11:36:53,935 [ 6640] INFO - le.impl.ModuleManagerComponent - 1 module(s) loaded in 996 ms
2017-12-04 11:36:54,082 [ 6787] INFO - j.ide.script.IdeStartupScripts - 0 startup script(s) found
2017-12-04 11:36:54,189 [ 6894] WARN - om.intellij.util.ProfilingUtil - Profiling agent is not enabled. Add -agentlib:yjpagent to idea.vmoptions if necessary to profile IDEA.
2017-12-04 11:36:54,489 [ 7194] INFO - PerformancePlugin - Performance Plugin is in silent mode
2017-12-04 11:36:55,060 [ 7765] INFO - rojectCodeStyleSettingsManager - Initialized from default code style settings.
2017-12-04 11:36:55,269 [ 7974] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 478ms; general responsiveness: ok; EDT responsiveness: ok
2017-12-04 11:36:56,085 [ 8790] INFO - tartup.impl.StartupManagerImpl - OpenFilesActivity run in 1378ms under project opening modal progress
2017-12-04 11:36:56,204 [ 8909] INFO - tartup.impl.StartupManagerImpl - InitToolWindowsActivity run in 119ms under project opening modal progress
2017-12-04 11:36:56,250 [ 8955] INFO - .diagnostic.PerformanceWatcher - Post-startup activities under progress took 1568ms; general responsiveness: ok; EDT responsiveness: ok
2017-12-04 11:36:56,980 [ 9685] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 1709ms; general responsiveness: ok; EDT responsiveness: 0/2 sluggish, 1/2 very slow
2017-12-04 11:36:56,981 [ 9686] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 10 files to update
2017-12-04 11:36:57,310 [ 10015] INFO - j.ide.ui.OptionsTopHitProvider - 258 ms spent to cache options in application
2017-12-04 11:36:57,322 [ 10027] INFO - tartup.impl.StartupManagerImpl - C:/Users/user/RubymineProjects/project-backend/.idea case-sensitivity: expected=false actual=false
2017-12-04 11:36:57,443 [ 10148] INFO - git4idea.GitVcs - Git version: 2.15.0.0 (CYGWIN)
2017-12-04 11:36:57,549 [ 10254] INFO - pl.projectlevelman.NewMappings - VCS Root: [Git] - [C:/Users/user/RubymineProjects/project-backend]
2017-12-04 11:36:58,119 [ 10824] INFO - tor.impl.FileEditorManagerImpl - Project opening took 6343 ms
2017-12-04 11:36:58,170 [ 10875] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 1189ms; general responsiveness: ok; EDT responsiveness: ok
2017-12-04 11:36:58,390 [ 11095] INFO - ellij.project.impl.ProjectImpl - 14 project components initialized in 15 ms
2017-12-04 11:36:58,524 [ 11229] INFO - ctView.v2.RailsProjectViewPane - module updated (Module: 'project-backend')
2017-12-04 11:36:58,536 [ 11241] INFO - byRemoteInterpreterManagerImpl - Uploading helpers for Remote: ruby-2.4.0-p0: ver.2.4.0p0 ( revision 57164) p0 (docker-compose://[C:\Users\user\RubymineProjects\project-backend\docker-compose.yml]:web//usr/local/bin/ruby) at Thread[ApplicationImpl pooled thread 3,4,Idea Thread Group]
2017-12-04 11:36:58,566 [ 11271] INFO - byRemoteInterpreterManagerImpl - Helpers uploaded for Remote: ruby-2.4.0-p0: ver.2.4.0p0 ( revision 57164) p0 (docker-compose://[C:\Users\user\RubymineProjects\project-backend\docker-compose.yml]:web//usr/local/bin/ruby) at Thread[ApplicationImpl pooled thread 3,4,Idea Thread Group]
2017-12-04 11:36:58,566 [ 11271] INFO - byRemoteInterpreterManagerImpl - Updating gems for Remote: ruby-2.4.0-p0: ver.2.4.0p0 ( revision 57164) p0 (docker-compose://[C:\Users\user\RubymineProjects\project-backend\docker-compose.yml]:web//usr/local/bin/ruby)
2017-12-04 11:36:59,073 [ 11778] INFO - j.ide.ui.OptionsTopHitProvider - 163 ms spent to cache options in project
2017-12-04 11:36:59,372 [ 12077] INFO - j.ide.plugins.RepositoryHelper - using cached plugin list (updated at 12/4/2017 11:26 AM)
2017-12-04 11:37:00,931 [ 13636] INFO - .CloudSilentLoggingHandlerImpl - Creating container...
2017-12-04 11:37:04,211 [ 16916] INFO - tellij.vcs.log.data.VcsLogData - Username not configured for root file://C:/Users/user/RubymineProjects/project-backend
2017-12-04 11:38:03,912 [ 76617] INFO - byRemoteInterpreterManagerImpl - Gems for Remote: ruby-2.4.0-p0: ver.2.4.0p0 ( revision 57164) p0 (docker-compose://[C:\Users\user\RubymineProjects\project-backend\docker-compose.yml]:web//usr/local/bin/ruby) updated
2017-12-04 11:38:05,926 [ 78631] WARN - brains.plugins.ruby.gem.GemBox - Unable to find lib directory C:/Users/user/.RubyMine2017.3/system/ruby_stubs/1301164762\-1480059672/../lib/ruby/2.4.0for Remote: ruby-2.4.0-p0: ver.2.4.0p0 ( revision 57164) p0 (docker-compose://[C:\Users\user\RubymineProjects\project-backend\docker-compose.yml]:web//usr/local/bin/ruby)
2017-12-04 11:38:05,958 [ 78663] INFO - pl.ProjectRootManagerComponent - project roots have changed
2017-12-04 11:38:07,641 [ 80346] INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 8323 to update, calculated in 16ms
2017-12-04 11:38:43,376 [ 116081] INFO - .diagnostic.PerformanceWatcher - Reindexing refreshed files took 35735ms; general responsiveness: ok; EDT responsiveness: ok
2017-12-04 11:38:43,384 [ 116089] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 5ms; general responsiveness: ok; EDT responsiveness: ok
2017-12-04 11:38:43,489 [ 116194] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 105ms; general responsiveness: ok; EDT responsiveness: ok
2017-12-04 11:38:43,494 [ 116199] INFO - e.GemRequirementsChangeWatcher - Initial scan started
2017-12-04 11:38:43,553 [ 116258] INFO - ctView.v2.RailsProjectViewPane - module updated (Module: 'project-backend')
2017-12-04 11:38:44,347 [ 117052] INFO - .CloudSilentLoggingHandlerImpl - Creating container...
2017-12-04 11:38:47,900 [ 120605] INFO - .run.runtime.DockerExecProcess - com.github.dockerjava.api.exception.NotModifiedException: <br/>caused by: com.github.dockerjava.api.exception.NotModifiedException:
2017-12-04 11:38:48,497 [ 121202] INFO - e.GemRequirementsChangeWatcher - Initial scan took: 5003 ms
2017-12-04 11:40:40,337 [ 233042] INFO - ails.preload.spring.SpringUtil - Disabling Spring
2017-12-04 11:40:40,846 [ 233551] INFO - .CloudSilentLoggingHandlerImpl - Creating container...
2017-12-04 11:40:45,073 [ 237778] INFO - .run.runtime.DockerExecProcess - com.github.dockerjava.api.exception.NotModifiedException: <br/>caused by: com.github.dockerjava.api.exception.NotModifiedException:
2017-12-04 11:41:09,681 [ 262386] INFO - .CloudSilentLoggingHandlerImpl - Creating container...
2017-12-04 11:41:13,086 [ 265791] INFO - stubs.SerializationManagerImpl - START StubSerializationManager SHUTDOWN
2017-12-04 11:41:13,087 [ 265792] INFO - stubs.SerializationManagerImpl - END StubSerializationManager SHUTDOWN
2017-12-04 11:41:13,087 [ 265792] INFO - il.indexing.FileBasedIndexImpl - START INDEX SHUTDOWN
2017-12-04 11:41:13,268 [ 265973] INFO - il.indexing.FileBasedIndexImpl - END INDEX SHUTDOWN
2017-12-04 11:41:13,273 [ 265978] INFO - org.jetbrains.io.BuiltInServer - web server stopped
2017-12-04 11:41:13,308 [ 266013] INFO - Types.impl.FileTypeManagerImpl - FileTypeManager: 1003 auto-detected files
Elapsed time on auto-detect: 390 ms
2017-12-04 11:41:13,310 [ 266015] INFO - .run.runtime.DockerExecProcess - com.github.dockerjava.api.exception.NotModifiedException: <br/>caused by: com.github.dockerjava.api.exception.NotModifiedException:
2017-12-04 11:41:13,312 [ 266017] INFO - pl.local.NativeFileWatcherImpl - Watcher terminated with exit code 0
2017-12-04 11:41:13,316 [ 266021] INFO - newvfs.persistent.PersistentFS - VFS dispose started
2017-12-04 11:41:13,381 [ 266086] INFO - newvfs.persistent.PersistentFS - VFS dispose completed
2017-12-04 11:41:13,384 [ 266089] INFO - #com.intellij.idea.Main - ------------------------------------------------------ IDE SHUTDOWN ------------------------------------------------------
2017-12-04 11:41:13,386 [ 266091] INFO - org.jetbrains.io.BuiltInServer - web server stopped

Gemfile:

source 'https://rubygems.org'

git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.1'
# Use mysql as the database for Active Record
gem 'mysql2', '0.4.5'
# Use Unicorn as the app server - UNLESS ON NATIVE WINDOWS
platforms :ruby do
gem 'unicorn-rails'
end

gem 'wdm', '>= 0.1.0' if Gem.win_platform?

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 3.0'

gem 'devise'
gem 'devise-encryptable'
gem 'devise-jwt'

gem 'active_model_serializers', '~> 0.10.0'

gem 'rack-cors'

# Create mysql views and use them as models
gem 'scenic'
gem 'scenic_mysql'

# Pagination
gem 'will_paginate'

# To allow grouping queries by specific date range (i.e. by month)
gem 'groupdate'
gem 'calculate-all'

# To build links for S3
gem 'paperclip'
gem 'aws-sdk'

# For storing sensitive environment variables
gem 'dotenv-rails'

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
gem 'rspec-rails'
gem 'rails-controller-testing'
gem 'factory_girl_rails'
gem 'database_cleaner'
end

group :test do
gem 'simplecov', :require => false
end

group :development do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'

# Use Capistrano for deployment
gem 'capistrano', '~> 3.6'
gem 'capistrano-rails', '~> 1.2'
gem 'capistrano-bundler', '>= 1.1.0'
gem 'capistrano-rvm'
gem 'capistrano3-unicorn'

# More advanced Rails console
gem 'pry-rails'

# For Rubymine Debugger support

gem 'ruby-debug-ide'
gem 'debase'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'rake-progressbar'
Dockerfile:
FROM ruby:2.4.0
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs libmariadb-client-lgpl-dev mariadb-client
RUN mkdir /prj
WORKDIR /prj
ADD Gemfile /prj/Gemfile
ADD Gemfile.lock /prj/Gemfile.lock
RUN gem install mysql2 -v='0.4.5' -- --with-mysql-config=/usr/bin/mariadb_config
RUN bundle install
ADD . /prj
 
docker-compose.yml:
version: '2'
services:
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: dev_db
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- ./docker/data:/docker-entrypoint-initdb.d
web:
build: .
command: bundle exec rails s -p 3000
volumes:
- .:/prj
ports:
- "3000:3000"
depends_on:
- db
1

Hello,

have you performed additional configuration in your Docker network?

0

Hi, I have the same problem on mac:

 

/usr/local/rvm/rubies/ruby-2.1.3/bin/ruby -e at_exit{sleep(1)};$$stdout.sync=true;$$stderr.sync=true;load($$0=ARGV.shift) /usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 1234 --host 0.0.0.0 --dispatcher-port 26168 -- /opt/project/bin/rails server Puma -b 0.0.0.0 -p 4000 -e development
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:1234
=> Booting Puma
=> Rails 4.2.7.1 application starting in development on http://0.0.0.0:4000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[1] Puma starting in cluster mode...
[1] * Version 3.11.0 (ruby 2.1.3-p242), codename: Love Song
[1] * Min threads: 1, max threads: 5
[1] * Environment: development
[1] * Process workers: 2
[1] * Preloading application
[1] * Listening on tcp://0.0.0.0:4000
[1] Use Ctrl-C to stop
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:44835
9: connection failed(1)
Exception: Connection refused - connect(2) for "172.18.0.1" port 26168
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `initialize'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `open'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:167:in `block in notify_dispatcher'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `times'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:165:in `notify_dispatcher'
/usr/local/rvm/gems/ruby-2.1.3@rails427/gems/ruby-debug-ide-0.6.0/lib/ruby-debug-ide.rb:112:in `block in start_control'
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:33545
12: connection failed(1)
Exception: Connection refused - connect(2) for "172.18.0.1" port 26168

 

Any idea?

2

Hello Carlos,

 

Looks like a bit different problem, could you please attach all logs (Help | Compress Logs and Show in Finder).  To reproduce we need your Dockerfile and docker-compose.yml if you are using it.

0

Hello Rich,

Sorry for the long response, Could you please try remove entrypoint from your docker-compose.yml? Most possible you are experiencing this issue: https://youtrack.jetbrains.com/issue/RUBY-20710

0

Please sign in to leave a comment.