Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby_gntp connection failure #395

Closed
jamesarosen opened this issue Jan 22, 2013 · 9 comments
Closed

ruby_gntp connection failure #395

jamesarosen opened this issue Jan 22, 2013 · 9 comments

Comments

@jamesarosen
Copy link

I get "Error sending notification with gntp: Register failed" on every Guard run.

  • Growl version 1.4
  • guard (1.6.1)
  • ruby_gntp (0.3.4)
# Guardfile
guard :test do
  watch(%r{^lib/(.+)\.rb$})
  watch(%r{^test/.+_test\.rb$})
  watch('test/test_helper.rb')  { "test" }
end

When I go through the examples in the ruby_gntp README, the notifications work fine. Growl is running and the network tab on its preference pane shows that it is listening for incoming network notifications.

@netzpirat
Copy link
Contributor

I do not have Growl version 1.4 available, because I've bought version 2.0.1 in the App store. The following snippet works fine and it uses the default GNTP options:

require 'ruby_gntp'
gntp = ::GNTP.new('Guard', '127.0.0.1', '', 23053)
gntp.register({
  :app_icon => File.expand_path(File.join('images', 'guard.png')),
  :notifications => [
    { :name => 'notify', :enabled => true },
    { :name => 'failed', :enabled => true },
    { :name => 'pending', :enabled => true },
    { :name => 'success', :enabled => true }
  ]
})
gntp.notify(:name => 'success', :title => 'Guard test', :text => 'This is a test')

Can you verify Growl listens on the same port?

@jamesarosen
Copy link
Author

That code works great on Growl 1.4. Do I need to add some setup to my Guardfile corresponding to the following?

gntp = ::GNTP.new('Guard', '127.0.0.1', '', 23053)
gntp.register({
  :app_icon => File.expand_path(File.join('images', 'guard.png')),
  :notifications => [
    { :name => 'notify', :enabled => true },
    { :name => 'failed', :enabled => true },
    { :name => 'pending', :enabled => true },
    { :name => 'success', :enabled => true }
  ]
})

@netzpirat
Copy link
Contributor

Strange, that code is basically a slightly modified version of the ::Guard::Notifiers::GNTP#notify method. I'm not aware of any setup needed, the parameters used are the default ones.

@netzpirat
Copy link
Contributor

@jamesarosen Did you solve the GNTP problem?

@jamesarosen
Copy link
Author

No, I switched to one of the other Growl gems.

@netzpirat
Copy link
Contributor

Ok, that's also a solution :P I'm closing this then, since I'm not able to reproduce it.

@maksimr
Copy link

maksimr commented Sep 22, 2013

Hi! I have same problem.

I try send notification on local machine from remote server.

Ubuntu 13.04
gol installed from repository
gem ruby_gntp

The example using gntp above work fine on local machine, but
on remote server I take 'ruby/gems/1.9.1/gems/ruby_gntp-0.3.4/lib/ruby_gntp.rb:91:in register': Register failed (RuntimeError)

I use remote forward in ssh

  RemoteForward 23053 localhost:23053

It seems to me where I was wrong :)

Thanks!

@netzpirat
Copy link
Contributor

@maksimr this looks like a Ruby GNTP issue, not much we can do from our side.

@maksimr
Copy link

maksimr commented Sep 22, 2013

Thanks!
Yes, I understand, but looking at their repository seems that the escort had left him.

P.S.
I noticed that it works through time, periodically it send notification ... %)

P.P.S

Problem in growl for linux mattn/growl-for-linux#39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants