Mailgun Rails provides webhook processing and event decoration to make using Mailgun with Rails much easier.
Put this in your Gemfile
:
git_source(:github){ |repo_name| "https://github.com/#{repo_name}.git" }
gem 'mailgun-rails', github: 'jbox-web/mailgun-rails', tag: '1.0.0'
then run bundle install
.