Skip to content
This repository

Allows Rspec to connect to DRb server #452

Closed
wants to merge 1 commit into from

3 participants

Ryan Scott Lewis David Chelimsky Andy Lindeman
Ryan Scott Lewis

My coworker and I spent hours finding this fix. Before the fix, we would have Spork running, run Rspec with --drb, and the Rspec would give the "No DRb server running." error. It would then continue to run the specs in both Spork and the local Rspec process.

David Chelimsky
Owner

What OS are you running on? We went back and forth on this a couple of years ago and ended up using localhost because it seemed to work on all OS's whereas 127.0.0.1 would cause intermittent hanging on OS X if you were tied to a network. Disconnect from the network and all was well. This may have been tied to a specific ruby implementation (it was a couple of years back), or perhaps even a spork implementation detail, but never-the-less, I'd need to be convinced that this would work for all users before accepting it.

Ryan Scott Lewis

Strange.. we had the opposite problem. Spork was working on 2 different Ubuntu 10.04 boxes and 1 Laptop with Windows 7 on it. But it was failing on 4 of our iMacs with OSX Snow Leopard on them and 2 Macbook Pros with OSX Lion on them. Once we implemented this patch, it worked for all machines. So we have our project pointed to my branch. One of the iMacs we used was right out of the box with JRuby 1.6.3 freshly installed on it.

Why not make this configurable, somehow?

David Chelimsky
Owner

@c00lryguy - I like the idea of making it configurable. You want to take a crack at that?

Andy Lindeman
Owner

No movement here in 8 months. Closing as a part of cleaning up issues; if anyone is seeing this problem and has cycles to make it configurable, feel free to open a new pull request :)

Andy Lindeman alindeman closed this July 22, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Sep 01, 2011
Ryan Scott Lewis Allows Rspec to connect to DRb server (Spork) e16d328
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/rspec/core/drb_command_line.rb
2  lib/rspec/core/drb_command_line.rb
@@ -11,7 +11,7 @@ def drb_port
11 11
 
12 12
       def run(err, out)
13 13
         begin
14  
-          DRb.start_service("druby://localhost:0")
  14
+          DRb.start_service("druby://127.0.0.1:0")
15 15
         rescue SocketError, Errno::EADDRNOTAVAIL
16 16
           DRb.start_service("druby://:0")
17 17
         end
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.