$customHeader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

How do I run the discussion forums in devstack?

  1. run LMS and CMS
  2. vagrant ssh
  3. sudo su forum
  4. git pull to get most recent version of cs_comments_service master branch
  5. If necessary, run a migration (see migration steps below).
  6. run the following commands

    bundle install # this should only be needed once
    API_KEY=password bundle exec rackup -o 0.0.0.0 -p 18080 # this command needs to be run every time you need discussions


    1. See https://github.com/edx/configuration/wiki/edX-Developer-Stack#forums--ruby-issues if having problem problems with missing Ruby gems (via bundle install).
    2. Use "ruby app.rb -p 18080" if rackup is not working, but this will not cache mongo results and should not be used for performance work.

How do I run a database migration on the cs_comments_service in devstack?

This is an example for a specific migration script:

mongo cs_comments_service_development scripts/db/migrate-007-thread-type.js


How do I run and debug unit tests for the comments service (ruby code)?

It may be simpler to follow instructions for setting up RubyMine for debugging.


  1. vagrant ssh
  2. sudo su forum
  3. rspec command will run all tests
  4. To run just a specific test, add ":focus => true" where the test is declared. Example:
    1. describe "app" do
          describe "notifications", :focus => true do

  5. Add a "debugger" command in the code where you want to stop in the debugger
  6. Now specify -d to the rspec command (rspec -d)
  7. If that fails with a message that starts with "cannot load such file -- ruby-debug", do this:
    1. edit Gemfile and uncomment the line with "debugger"
    2. bundle install
    3. Run rspec -d again

How do I enable cohorts?

See Internal Cohort Documentation

and/or https://docs.google.com/document/d/1o7S79mLilcRfJ2E6cILcfVOTBb8-m_CNXi7K_yiWE88/edit

Then add your course author as a forum admin or moderator so that they can see all cohorts (via LMS instructor dashboard).

Note that posts created BEFORE cohorts are enabled will be visible to all cohorts. Therefore it is necessary to create users in the various cohorts and create new posts within cohorted topics to see that cohorting is working.

  • No labels