Closed rking closed 11 years ago
See Issue #7
Can you please accept or comment on this?
It's completely not-working for me without this.
Sorry, I was waiting you to answer my question in #7. I think DRuby should bind to the right host by default. Can you explain your setup? If it is normal we should report that issue to DRuby devs and I will pull your workaround.
Oh snap. So sorry.
DRb.start_service
, will try to bind to the default hostname. On my system it just is the output of the hostname
command, which is a nonsense name. The exact same thing happens on all 3 machines I tried. I'm not sure how it's working for anyone, to be honest (but then again I don't know DRb well)Can you change your hostname to localhost or point your current hostname to your computer 127.0.0.1? You may have troubles with other programs in future, so that seems like a better solution for me. What do you think?
Oh man. Apparently I got the bright idea a while back to start doing this in /etc/hosts
:
127.0.0.1 localhost
localhost myhostname
When what it demands is:
127.0.0.1 localhost
127.0.0.1 myhostname
After that edit, the rubygems spork-minitest
now works for me.
So, I still have to wonder, though, the benefit of spork-minitest
's start_service
call over RSpec's?
Under what circumstances would someone expect it to look up hostname
to something other than 127.0.0.1
and then listen to that address?
I'm glad you figured it out :-)
Honestly, I don't know much about hostnames, but I would stick to defaults in that case. Let me know if you find out though, maybe the default start_service is not intended for our usage.
This brings the runner in line with: https://github.com/dchelimsky/rspec/blob/master/lib/spec/runner/drb_command_line.rb#L17
Without this patch, spork-minitest tries to connect to a nonexistent host (and on my system it times out due to OpenDNS pretending all hosts exist.)