Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Sending emails in development
E-mails are sent by
resque and scheduled by
resque-scheduler, so you must run the scheduler and (at least) one resque worker:
$ QUEUE="*" bundle exec rake resque:work $ bundle exec rake resque:scheduler
Don't forget to set your SMTP configurations in the application. And when you modify it, don't forget to restart the web server and all resque processes.
Testing and modifying emails: MailCatcher
MailCatcher is a gem used to "capture" emails and shows them in a simple interface. Very useful when modifying emails in development.
$ bundle install $ rbenv rehash
From inside a VM set up with Vagrant, run it with:
$ mailcatcher --http-ip=0.0.0.0
Configure the application with the following SMTP configurations:
- SMTP sender: anything, as long as it's a valid e-mail
- SMTP domain:
- SMTP port:
- Leave all the other SMTP options blank.
Run the resque workers and the scheduler as described in this section.
Now all emails sent by Mconf-Web will go to the SMTP server created by MailCatcher and will be available on its interface at http://localhost:1080/.
Updating the list of meetings:
Meetings in Mconf-Web are instances of the model
BigbluebuttonRails uses resque to schedule workers that will created meetings when a user joins a room. These workers run in background, and need resque to be triggered for then to actually work:
$ rake resque:work QUEUE='*'
Read more at BigbluebuttonRails README.
Using a fake LDAP server on development
There's a rake task called
ldap:server which after invoked starts a LDAP server in localhost with the same config options as the ones in your database.
$ bundle exec rake ldap:setup_site # configure the LDAP attributes in your site $ bundle exec rake ldap:server
By default there's only one registered user with login
mconf-user and password
You can supply a port number with:
$ bundle exec rake ldap:server
If not present it will use the port configured for the website or 1389.
Recommended site configurations:
- LDAP: Enable authentication: --check--
- LDAP: Server IP or domain:
- LDAP: Server port:
- LDAP: Full DN or user to bind:
- LDAP: Password to connect:
- LDAP: Full DN for the users tree:
- LDAP: Field to obtain the username:
- LDAP: Field for principal name (unique ID):
- LDAP: Field to obtain the user's email:
- LDAP: Field to obtain the user's full name:
Using ruby with rbenv
You can easily replace RVM by rbenv.
First make sure you remove RVM (
rvm implode) and all references to it. Then install rbenv following the guide at their GitHub page.
Install the target ruby (check on
.ruby-version the version you should install):
$ rbenv install 1.9.2-p290 $ rbenv rehash
$ gem install bundler
And then use
bundle exec always when running ruby commands, for example:
$ bundle exec rake db:migrate $ bundle exec rails server
rbenv has no gemsets as used in RVM, so you bundler is used to keep track of the gems and the versions that should be used.