开发者

Playing sound in Ruby 1.9.2 on Windows 7?

Whe开发者_如何学Cn I follow this tutorial on Ruby 1.9.2 on Win 7, I get this error:

Playing sound in Ruby 1.9.2 on Windows 7?

Is there a simpler way to play a sound? (specifically, wav)


The problem is that you're using Ruby 1.9.2 and the binary gem for win32-sound, the binary, has not been compiled or made compatible with Ruby 1.9.x, only Ruby 1.8

You can skip this using the RubyInstaller DevKit downloadable from RubyInstaller website.

Please follow the instructions from the DevKit page to complete the installation. Also note that to install win32-sound, you will need to change the command for the gem installation.

First:

gem list win32
gem list windows

Uninstall all the win32- and windows gems

Then:

gem install win32-sound --platform=ruby

That should install and compile a binary compatible with your installed Ruby.

Hope that helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜