Skip to content

Commit

Permalink
more descriptive LoadError for spork/ext/ruby-debug
Browse files Browse the repository at this point in the history
if ruby-debug not installed and the project loads spork/ext/ruby-debug, then it shows an error saying 'ruby-debug' not installed.

This can confuse the user, as they required 'spork/ext/ruby-debug' in the project, not ruby-debug.  Why didn't spork install ruby-debug for me?

Well, the answer is because spork/ext/ruby-debug is optional.  This new error should make that clear.
  • Loading branch information
timcharper committed Nov 4, 2009
1 parent 9be9aa7 commit 41f7897
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/spork/ext/ruby-debug.rb
@@ -1,7 +1,9 @@
require 'ruby-debug'
require 'socket'
require 'forwardable'

begin
require 'ruby-debug'

# Experimental!

class SporkDebugger
Expand Down Expand Up @@ -143,3 +145,6 @@ def wait_for_connection

Spork.prefork { SporkDebugger.run } if Spork.using_spork?

rescue LoadError
raise Loaderorr, "Your project has loaded spork/ext/ruby-debug, which relies on the ruby-debug gem. It appears that ruby-debug is not installed. Please install it."
end

0 comments on commit 41f7897

Please sign in to comment.