Ask A Question

Notifications

You’re not receiving notifications from this thread.

How to Build a Slack Slash Command App with Rails Discussion

/soo nice
/great job!

Reply

Great tutorial and subject!

Reply

I followed the tutorial and get the following error when I am authenticating the Slack response.

Processing by Slack::CommandsController#create as HTML
Parameters: {"token"=>"HH1aNamaPjxndTgUTZM", "team_id"=>"TD548K4", "team_domain"=>"gorailstest", "channel_id"=>"CDTGR2T", "channel_name"=>"general", "user_id"=>"UD54QA", "user_name"=>"rsehd", "command"=>"/kr3ve", "text"=>"hello", "response_url"=>"https://hooks.slack.com/commands/TD548K4/565544170084TDORuvtAyOOEYJdCi6dL", "trigger_id"=>"5659923814.44657650.5c8f42dcca5d895283a417f8671f548e"}
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)

TypeError (no implicit conversion of nil into String):

app/controllers/slack/commands_controller.rb:26:in hexdigest'
app/controllers/slack/commands_controller.rb:26:in
verify_slack_request'

Reply
Reply

Thank you Zack. I resolved it by watching Episode 229.

Reply

To whom is having issues on Rails 6
If you see 403 Forbidden in ngrok. You have to add ngrok url to whitelist.
Add config.hosts << /.+.ngrok.io/ to config/environments/development.rb.

Reply

Great tutorial!

I'd be interested in learn how to enable a user to publish messages from a Rails App to Slack and the Slack message will be attributed to the user / not a bot.

Reply

I second this. Can you create more videos around slack bots ?

Reply

Hi! great video! I set up my slack app and my first slash command but I am getting an error when typing command in my slack channel: failed with the error "dispatch_failed". The routes seem fine because the request is successful in Postman. My slash command is http://localhost:3000/slack/command. I have tried using ngrok but the error is the same. My routes: post "/slack/command", to: "slack/commands#create". Could you please advise? thanks

Reply

I'd be interested in learn how to enable a user to publish messages from a Rails App to Slack and the Slack message will be attributed to the candy clicker

Reply

great video dude, nice job
@friday night funkin'

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.