diff --git a/lib/private_pub/view_helpers.rb b/lib/private_pub/view_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/private_pub/view_helpers.rb
+++ b/lib/private_pub/view_helpers.rb
@@ -15,7 +15,7 @@ module PrivatePub
     def subscribe_to(channel)
       subscription = PrivatePub.subscription(:channel => channel)
       content_tag "script", :type => "text/javascript" do
-        raw("PrivatePub.sign(#{subscription.to_json});")
+        raw("if (typeof PrivatePub != 'undefined') { PrivatePub.sign(#{subscription.to_json}) }")
       end
     end
   end
Only sign when PrivatePub is avaiable.  When thin server is down, PrivatePub is undefined and client will get an error on not able to accessing faye.js.