-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RubyMine and Docker integration seems buggy #158
Comments
Ok, I provided really few words since I thought, that maybe somebody encountered the error already. |
I tried to update debase and ruby-debug-ide until the last available beta versions and the test seems running in debug mode now (before they were stuck on the last exception), but with exceptions still:
|
Tried running ruby 2.4.4 instead of 2.5.0. Didn't work. Seems like the reason is in the specific operation and Rails 5.2.0 (since it worked with Rails 4.2.0, as I mentioned above) |
@lancedikson Do you have 26168 port opened? |
@ViugiNick, hey, I'm not sure if it was. But I already left the use of Docker runtime for development. It's much faster when it's running on the real machine. Basically, I can't reproduce the issue anymore. Thus we can close this until somebody run into the same problem. |
@lancedikson Just ran into this while trying to do local environment setup using docker-compose
|
@tuckerbuchy I'm getting the exact same error. Did you find a way to solve this issue?
Thanks :) |
@cesar3030 @tuckerbuchy Looks like you are using pretty old |
Thanks @ViugiNick!
I know it's not the best to use beta versions but it does the job for now 👍 |
I had the same issue with RubyMine when trying to run Rspec tests in debug mode. Since It was working with VSC so I choose to go ahead and start using VSC instead of RubyMine (at least while this issue has not been solved)... |
@cesar3030 @arthur5005 So VSC debug works with the same ports? Maybe it will help #107 (comment) |
This is what I did to debug in VSC. It's a bit of a hack but it does the job for now... Every time I need to debug, I've to set the
docker-compose.yml: web:
build: .
environment:
RDEBUG: ''
command: sh scripts/start.sh
volumes:
- .:/app
ports:
- 3000:3000
- 1234:1234
- 26162:26162 My start script: rm -f tmp/pids/server.pid
if [ "${RDEBUG}" = "rails" ] ;then
bundle exec rdebug-ide --debug --host 0.0.0.0 --port 1234 -- bin/rails s -p 3000 -b 0.0.0.0
elif [ "${RDEBUG}" = "rspec" ] ;then
bundle exec rdebug-ide --debug --host 0.0.0.0 --port 1234 -- bin/bundle exec rspec spec
else
bundle exec rails s -p 3000 -b 0.0.0.0
fi Here is my attach to docker VSC Config: {
"name": "Attach to Docker",
"type": "Ruby",
"request": "attach",
"remotePort": "1234",
"remoteHost": "127.0.0.1",
"remoteWorkspaceRoot": "/app",
"cwd": "${workspaceRoot}",
"showDebuggerOutput": true
} Step to debug:
This is a lot of steps and I wish I will find a better way to debug asap. |
@cesar3030 @arthur5005 Could you try to install |
I will try it next time I'll have to debug my rails app. |
@ViugiNick I just had a moment to try that branch today. Still failing, with connection refused.
|
Have save issue. |
i am having the same issue and also i had nothing showing in my browser, here's the error log:
|
RubyMine users: I also got very blocked on the I can't reason as to why, but disabling Spring for debugging helped me out here. I'd previously had the forked Spring config for the project, but I removed this and allowed RubyMine to disable it for the project, and voila, no more errors. However, I am still having trouble getting it to work for running the Rails application. |
@eiseneker Maybe you need to forward more ports with enabled spring |
any luck? |
Same problem, running rails server via debugger works fine but debugging tests fails with "Connection refused". |
I am having the same issue, anyone sorted this out? |
+1 same issue here
running through interpreter configured via docker compose |
@Rory-Powell please, use rubymine tracker to report issues about rubymine. |
@Rory-Powell I have worked around this issue & issue reported in #107 using fixes discussed in respective issues. Since changes are not merged to release, I'm using a different branch with the fix. |
Update: The cause in my case was puma running in clustered mode. I noticed that a single connection attempt is made in single mode where as two connections are attempted in clustered mode and the second one is where the exception is being raised. |
Yes, the issue only happen when trying to run in |
@Rory-Powell you saved my life |
Has anyone managed to get it working in |
if anyone hasn't managed to fix this yet, just ensure the dispatcher port is not included in your docker compose file port mappings, unlike suggested on the readme of this gem |
This is the only thing that worked for me Thanks @Rory-Powell ❤️ |
Trying to run a Rails test in debug mode with RubyMine, running it on Docker and it doesn't work for some reason. Normal mode works fine though. Does anybody have an idea what's wrong with the debug mode here?
The text was updated successfully, but these errors were encountered: