Troubleshooting

You're missing the development kit required to build native extensions.

RubyInstaller for ruby 2.4.3-2 and above

RubyInstaller after version 2.3.3 now includes the development kit in the installer. If you do not have the development kit and have installed ruby using RubyInstaller, open a command prompt with administrator privileges and run:

ridkinstall

Select option 3, and then run

ridkenable

To enable the changes

RubyInstaller for ruby 2.3.3 and below

Download the development kit here (scroll down to "Development Kit", then choose the one for Ruby 2.0 and your system architecture) and extract it somewhere. Open a command prompt in that folder and run:

rubydk.rbinitrubydk.rbinstall

Then reinstall discordrb:

gemuninstalldiscordrbbundleinstall# Or, if you didn't use bundler:
geminstalldiscordrb

Your ffi setup is screwed up, first run gem uninstall ffi (uninstall all versions if it asks you, say yes to any unmet dependencies), then run gem install ffi --platform=ruby to fix it. If it says something about build tools, follow the steps in the first troubleshooting section.

Note: The discordrb gem relies on discordrb-webhooks. If you already have discordrb installed, require 'discordrb/webhooks' will include all of the Webhooks features as well.

Support

You can find me (@meew0, ID 66237334693085184) on the unofficial Discord API server - if you have a question, just ask there, I or somebody else will probably answer you: https://discord.gg/3Trm6FW

Development

This section is for developing discordrb itself! If you just want to make a bot, see the Installation section.

After checking out the repo, run bin/setup to install dependencies. You can then run tests via bundle exec rspec spec. Make sure to run rubocop also: bundle exec rubocop. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.