Natenoms Wiki

Weil Teilen Spaß macht :)

User Tools

Site Tools


Translations of this page:


Lizenz dieses Wikis
Über dieses Wiki
Feed des Wikis

Was gerade in meinem Blog geschieht:


Mumble-Ruby installation

In this howto we install Mumble-Ruby into a new users´ context.

We use a Debian 'Wheezy' (stable), Ubuntu should work, too. Even Debian Squeeze (oldstable) does the job, if you install libopus0 and libopus-dev from the backports.


Install the following dependencies as root or via sudo:

apt-get install curl libyaml-dev git libopus-dev build-essential zlib1g zlib1g-dev libssl-dev
Add a new user

As root or via sudo:

adduser botmaster

All relevant scripts will run with this user context.

Install and setup Mumble-Ruby with RVM (Ruby Version Manager)

From now on work as the new user:

su - botmaster

Thanks to [ RVM] (Ruby Version Manager) this howto runs on a Debian, regardless of the Ruby version.

Install the GPG key of rvm:

gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

We need at least Ruby 1.9.x, here we use the latest stable version:

curl -L | bash -s stable

toggle = left |title = Console output |titlestyle = background:palegreen;

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    282      0 --:--:-- --:--:-- --:--:--   368
100 20511  100 20511    0     0  21614      0 --:--:-- --:--:-- --:--:-- 21614

Installing RVM to /home/botmaster/.rvm/
    Adding rvm PATH line to /home/botmaster/.profile /home/botmaster/.bashrc /home/botmaster/.zshrc.
    Adding rvm loading line to /home/botmaster/.bash_profile /home/botmaster/.zlogin.
Installation of RVM in /home/botmaster/.rvm/ is almost complete:

  * To start using RVM you need to run `source /home/botmaster/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# botmaster,
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
# ~Wayne, Michal & team.

In case of problems: and
  source ~/.rvm/scripts/rvm
  rvm autolibs disable
  rvm install ruby --latest
Searching for binary rubies, this might take some time.
Found remote file
ruby-2.1.1 - #configure
ruby-2.1.1 - #download
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23.0M  100 23.0M    0     0  2047k      0  0:00:11  0:00:11 --:--:-- 2379k
ruby-2.1.1 - #validate archive
ruby-2.1.1 - #extract
ruby-2.1.1 - #validate binary
ruby-2.1.1 - #setup
ruby-2.1.1 - #making binaries executable.
ruby-2.1.1 - #downloading rubygems-2.2.2
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  404k  100  404k    0     0   584k      0 --:--:-- --:--:-- --:--:--  674k
No checksum for downloaded archive, recording checksum in user configuration.
ruby-2.1.1 - #extracting rubygems-2.2.2.
ruby-2.1.1 - #removing old rubygems.
ruby-2.1.1 - #installing rubygems-2.2.2..............
ruby-2.1.1 - #gemset created /home/botmaster/.rvm/gems/ruby-2.1.1@global
ruby-2.1.1 - #importing gemset /home/botmaster/.rvm/gemsets/global.gems..
ruby-2.1.1 - #generating global wrappers.
ruby-2.1.1 - #gemset created /home/botmaster/.rvm/gems/ruby-2.1.1
ruby-2.1.1 - #importing gemsetfile /home/botmaster/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.1.1 - #generating default wrappers.
Setup Ruby environment

Now setup the environment for Ruby:

rvm --create use @bots
ruby-2.1.1 - #gemset created /home/botmaster/.rvm/gems/ruby-2.1.1@bots
ruby-2.1.1 - #generating bots wrappers.
Using /home/botmaster/.rvm/gems/ruby-2.1.1 with gemset bots
Install Mumble-Ruby
git clone
Cloning into 'mumble-ruby'...                                                                
remote: Counting objects: 240, done.
remote: Compressing objects: 100% (138/138), done.
remote: Total 240 (delta 118), reused 180 (delta 87)
Receiving objects: 100% (240/240), 37.75 KiB, done.                                             
Resolving deltas: 100% (118/118), done.  
  cd mumble-ruby
ruby-2.1.1 - #gemset created /home/botmaster/.rvm/gems/ruby-2.1.1@mumble_ruby_gem                   
ruby-2.1.1 - #generating mumble_ruby_gem wrappers.     
  rvm use @bots

  gem build mumble-ruby.gemspec
Using /home/botmaster/.rvm/gems/ruby-2.1.1 with gemset bots                                         
botmaster@debian:~/mumble-ruby$ gem build mumble-ruby.gemspec                                       
WARNING:  licenses is empty, but is recommended.  Use a license abbreviation from:                                                                            
WARNING:  open-ended dependency on activesupport (>= 0) is not recommended                               
  if activesupport is semantically versioned, use:                                                       
    add_runtime_dependency 'activesupport', '~> 0'                                                       
WARNING:  open-ended dependency on ruby_protobuf (>= 0) is not recommended                               
  if ruby_protobuf is semantically versioned, use:                                                       
    add_runtime_dependency 'ruby_protobuf', '~> 0'                                                       
WARNING:  open-ended dependency on hashie (>= 0) is not recommended                                          
  if hashie is semantically versioned, use:                                                                  
    add_runtime_dependency 'hashie', '~> 0'                                                                  
WARNING:  open-ended dependency on opus-ruby (>= 0) is not recommended                                       
  if opus-ruby is semantically versioned, use:                                                                  
    add_runtime_dependency 'opus-ruby', '~> 0'                                                                  
WARNING:  See for help                                         
  Successfully built RubyGem                                                                                       
  Name: mumble-ruby                                                                                                
  Version: 1.0.2                                                                                                    
  File: mumble-ruby-1.0.2.gem
  rvm @bots do gem install mumble-ruby-*.gem
Fetching: atomic-1.1.15.gem (100%)
Building native extensions.  This could take a while...
Successfully installed atomic-1.1.15
Fetching: thread_safe-0.2.0.gem (100%)
Successfully installed thread_safe-0.2.0
Fetching: minitest-5.3.0.gem (100%)
Successfully installed minitest-5.3.0
Fetching: tzinfo-1.1.0.gem (100%)
Successfully installed tzinfo-1.1.0
Fetching: i18n-0.6.9.gem (100%)
Successfully installed i18n-0.6.9
Fetching: activesupport-4.1.0.rc1.gem (100%)
Successfully installed activesupport-4.1.0.rc1
Fetching: ruby_protobuf-0.4.11.gem (100%)
Successfully installed ruby_protobuf-0.4.11
Fetching: hashie-2.0.5.gem (100%)
Successfully installed hashie-2.0.5
Fetching: ffi-1.9.3.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ffi-1.9.3
Fetching: opus-ruby-0.0.1.gem (100%)
Successfully installed opus-ruby-0.0.1
Successfully installed mumble-ruby-1.0.2
Parsing documentation for activesupport-4.1.0.rc1
Installing ri documentation for activesupport-4.1.0.rc1
Parsing documentation for atomic-1.1.15
Installing ri documentation for atomic-1.1.15
Parsing documentation for ffi-1.9.3
Installing ri documentation for ffi-1.9.3
Parsing documentation for hashie-2.0.5
Installing ri documentation for hashie-2.0.5
Parsing documentation for i18n-0.6.9
Installing ri documentation for i18n-0.6.9
Parsing documentation for minitest-5.3.0
Installing ri documentation for minitest-5.3.0
Parsing documentation for mumble-ruby-1.0.2
Installing ri documentation for mumble-ruby-1.0.2
Parsing documentation for opus-ruby-0.0.1
Installing ri documentation for opus-ruby-0.0.1
Parsing documentation for ruby_protobuf-0.4.11
Installing ri documentation for ruby_protobuf-0.4.11
Parsing documentation for thread_safe-0.2.0
Installing ri documentation for thread_safe-0.2.0
Parsing documentation for tzinfo-1.1.0
Installing ri documentation for tzinfo-1.1.0
Done installing documentation for activesupport, atomic, ffi, hashie, i18n, minitest, mumble-ruby, opus-ruby, ruby_protobuf, thread_safe, tzinfo after 29 seconds
11 gems installed

Now your Mumble-Ruby is operational :)

Do the following after every login or at the start of Mumble-Ruby scripts

This is essential so that the correct environment is used for the bots. Execute both lines or add them to your start script:

  source ~/.rvm/scripts/rvm
  rvm use @bots
Test Mumble-Ruby

Now download a test Ruby script, to test Mumble-Ruby; the script connects the bot to a server and shows a list of all channels on that server in your console.

wget -O /home/botmaster/mumble-ruby-test.rb

See the script here.

Now run the script:

ruby mumble-ruby-test.rb
{0=>#<Hashie::Mash channel_id=0 description_hash="\xBE\x06\x88\xDB\x9B$\xF6\x01\xCD\xF2\xC1\xDE~V\xDCXw\xDA\xEEb" name="ᎭᎪᎢᎬᎭᎾᎷ" position=0>, 1=>#<Hashie::Mash channel_id=1 name="AFK" parent=0 position=60>, 5=>#<Hashie::Mash channel_id=5 description="" name="Empfangshalle" parent=0 position=0>, 3=>#<Hashie::Mash channel_id=3 name="Halle der kaguBischen Ahnungslosigkeit" parent=0 position=0>, 4=>#<Hashie::Mash channel_id=4 description="<a href=\"\"><span style=\"color:#0057ae\"></span></a>" name="Mumble-Django rockt :)" parent=0 position=0>, 9=>#<Hashie::Mash channel_id=9 name="Ole und Gregor" parent=0 position=0>, 6=>#<Hashie::Mash channel_id=6 description="" name="Zocken" parent=0 position=0>, 10=>#<Hashie::Mash channel_id=10 name="lala" parent=3 position=0>, 7=>#<Hashie::Mash channel_id=7 name="Privat" parent=6 position=0>}
Bots with Mumble-Ruby
en/mumble/clienten_und_projekte/mumble-ruby/installation.txt · Last modified: 2017/11/12 10:35 by Natenom