examples/logservice.rb in spqr-0.1.4 vs examples/logservice.rb in spqr-0.2.0
- old
+ new
@@ -22,10 +22,15 @@
# generated log records in that file, and they will persist between
# invocations.
require 'spqr/spqr'
require 'spqr/app'
-require 'rhubarb/rhubarb'
+begin
+ require 'rhubarb/rhubarb'
+rescue LoadError
+ puts "You must have Rhubarb installed to run this example.\nTry \"gem install rhubarb\", and ensure that it is in your load path."
+ Process.exit
+end
class LogService
include SPQR::Manageable
[:debug, :warn, :info, :error].each do |name|