phallstrom / slackistrano

Slack integration for Capistrano deployments.
MIT License
373 stars 74 forks source link

Error notifying Slack! #53

Closed qbarbosa closed 8 years ago

qbarbosa commented 8 years ago

I configured Slackistrano as followed :

Gemfile :

source 'https://rubygems.org'

gem "capistrano", "~>3.4"

group :development do
    gem "capistrano-symfony", '~> 1.0.0.rc1'
    gem "slackistrano"
    gem "sshkit"
    gem "colored"
end

Capfile :

require 'slackistrano/capistrano'
set :slack_via_slackbot, false
set :slack_team, "myteam"
set :slack_webhook, 'https://hooks.slack.com/services/xxxx/xxxx/xxxxxxx'
set :slack_channel, '#dev'
set :slack_username, 'Capistrano'

But when I run cap prod slack:deploy:updating I get the following :

00:00 slack:deploy:updating [slackistrano] Error notifying Slack! [slackistrano] Error: #<SocketError: getaddrinfo: nodename nor servname provided, or not known> (Backtrace restricted to imported tasks) cap aborted! NoMethodError: undefined method `code' for nil:NilClass

It seems like there is no response from Slack's servers.

Any help would be appreciated :)

phallstrom commented 8 years ago

Hrm. Just tried it with my config (matching yours, but using my own stuff obviously) and it's working. Only thing I can think is to double check the values for team, webhook, and channel to make sure they are right.

qbarbosa commented 8 years ago

I triple checked it, and I even recreated a webhook.

I don't understand what is wrong. :/

qbarbosa commented 8 years ago

Okay I found it and as expected it was something silly : I configured Slackistrano in my Capfile while it should have been done in the deploy.rb

Thank you for @phallstrom for answering.