Skip to content


Subversion checkout URL

You can clone with
Download ZIP
BigBlueButton integration for Ruby on Rails
Ruby JavaScript
branch: hpuit

This branch is 12 commits ahead, 365 commits behind mconf:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


BigBlueButton on Rails

BigBlueButton integration for Ruby on Rails 3.


  • Allows multiple servers and multiple conference rooms

  • Full API access using bigbluebutton-api-ruby (

  • Easy way to join conferences: simply create a room and call the “join” action

  • Easy integration with authentication and authorization mechanisms, such as Devise and CanCan

  • Possibility to create private rooms, that require a password to join

  • Deals with visitors (users that are not logged), allowing (or forbidding) them to join rooms

  • Random meeting IDs to avoid problems with end_meeting, timeouts and reuse of URLs

Planned features:

  • Friendly URLs (e.g.

  • Limit the number of users per room and rooms per server

  • Server administration (modify config.xml, use bbb-conf, etc.)

  • Load balancing

  • Dealing with rooms that exist in the BigBlueButton server but not in the DB

For more future features and issues check our google code page.


You can install the latest version of BigbluebuttonRails using RubyGems:

gem install bigbluebutton_rails

Or simply add the following line in your Gemfile:

gem "bigbluebutton_rails"

After installing, you need to run the generator:

rails generate bigbluebutton_rails:install

This generator will create a migration file and a locale file in your application directories. Take a look at the migration to see how the models used by BigbluebuttonRails look like.

To now more about the generators see How to: Generators


The routes to BigbluebuttonRails can be generated with the helper bigbluebutton_routes. See the example below:

bigbluebutton_routes :default

resources :users do
  bigbluebutton_routes :room_matchers
  resources :spaces do
    bigbluebutton_routes :room_matchers

The first line generates the default routes. You need to call it at least once to generate the following routes:

bigbluebutton_routes :default

It generates routes scoped with 'bigbluebutton'. These routes look like:


You can customize the scope name and also make the routes point to custom controllers.

bigbluebutton_routes :default, :scope => 'webconference', :controllers => { :servers => 'custom_servers', :rooms => 'custom_rooms' }
bigbluebutton_routes :default, :scope => '' # to remove the scope

If you customize the controllers as in the first line in the example above, be warned that every route generated after this will be using these controllers!

You may also want shorter routes to access conference rooms. For that, use the option room_matchers:

bigbluebutton_routes :room_matchers

It creates routes to the actions used to access the conference room: “show”, “join”, “auth”, “running”, “end”, “invite”, and “join_mobile”. So you can allow access to webconference rooms using URLs such as:

Obs: BigbluebuttonRails does not allows the room access using IDs such as “room-5” or “public-room” yet, but soon you it will.

User authorization, permissions and assumptions

There are some basic assumptions made by BigbluebuttonRails:

  • You have a method called current_user that returns the current user;

  • The current_user has an attribute or method called “name” that returns his/her fullname.

If you don't, you can change this behaviour easily, keep reading.

BigbluebuttonRails uses the methods bigbluebutton_user and bigbluebutton_role(room) to get the current user and to get the permission that the current user has in the room, respectively. These methods are defined in lib/bigbluebutton_rails/controller_methods.rb and you can reimplement them in your application controller to change their behaviour.

See also


For gem dependencies check the gemspec file.


  • Javascripts:

  • Images:

    • loading.gif

JQuery is used in the views join and invite and can be copied into your application with:

rails generate bigbluebutton_rails:public

How it works


BigbluebuttonRails has two entities: servers and rooms. Servers can have multiple rooms, that belong to a server and can also belong to any other model. You can make a room belong to a user, for example.

Every server has an associated API object (using the gem bigbluebutton-api-ruby) used to access the BigBlueButton server. The server controller has only the standard CRUD actions defined by Rails.

The rooms controller also have the CRUD actions, plus some specific actions to join, end, and check if a meeting is currently running in the room. These extra actions will be explained bellow.

A room model has methods to fetch and send information to the BBB server. They are simple API calls, but the “fetch” methods check the response and store data from it, while the “send” methods just make the API call. You can, for example, use fetch_meeting_info to get information about the meeting (will trigger the API call getMeetingInfo). The data parsed from the response wil be stored in the model and can be accessed using it's attributes.

All methods in the models that trigger any API call are documented with “Triggers API call” and the API functions that are called. Be aware that they can throw a BigBlueButtonException.


running and end

These are pretty simple actions. running returns a json indicating if the conference is running or not, while end ends the meeting.


This is an action that simply renders a view with a QR code and a link to join the conference from a mobile device. The link and the QR code point to links using the protocol “bigbluebutton://”, so it can be associated with a native mobile application that will open the conference (such as the Android client for BigBlueButton).

join, invite and auth

The actions used to redirect a user to join a room are join and invite, while auth is used by invite to authenticate the user. Basic differences:

  • invite renders a view to ask for a user name and a password. It is used to enable anonymous users to join a room or to define the user role using the room password instead of the bigbluebutton_role method.

    • It first checks bigbluebutton_role to see if the current user already has a role in the target room.

      • In case it has (see controller_methods.rb for more info), redirects to join.

      • Otherwise:

        • If there is a user logged, uses bigbluebutton_user().name as the user name. Otherwise, ask the user to type a name.

  • join requires a logged user and uses bigbluebutton_role to get the role for this user

    • It redirects the user straight to the meeting if the join is successful.

    • In case there's no role associated with the current user, falls back to invite to ask for a password.

Internally, they use the same algorithm:

  • If the user is a moderator:

    • If the room is not created yet, creates it.

    • Redirects the user to the meeting as a moderator.

  • If the user is not a moderator (a normal attendee):

    • If the meeting is running, redirects the user to the meeting as an attendee.

    • Otherwise:

      • join renders the join view, to wait for a moderator before joining the conference. The page will continuously pool the server to check if the meeting is running. When it starts, it redirects the user to the conference.

      • invite renders the invite view again and shows a warning informing that the meeting is not running. The user must re-submit the form to try again.


Install the dependencies:

bundle install

Prepare the rails_app used for tests:

rake setup:rails_app

Run the tests:

rake spec

Develop. :)

Something went wrong with that request. Please try again.