Version 42, last updated by Titas Norkunas at October 25, 2011 13:22 UTC

This page explains how to set up the application after you have installed the application stack - Ruby, Rails, Rails gems, your development tools, and MySQL.

Get the Code

If you use Windows Instant Rails, checkout the code into \InstantRails?\rails_apps\breakout. After the initial build of breakout, it will be available within InstantRails? -> Menu -> Rails Applications -> Managing Rails Applications.

Configure

Requirements

  • bundler (gem install bundler)

Configure breakout

In order to avoid overwriting your configuration files, we have renamed the configuration files that you are likely to modify to ".example". Please copy these files and edit the new versions to match your environment.

  • config/database.yml.example --> config/database.yml.  Edit this file to
  • config/tools.yml.example --> config/tools.yml .  Edit this file to change the list of tools that are available on your system.
  • config/settings_local.yml.example --> config/settings_local.yml. We used config/environments/local_conf.rb.example that we used to rename into local_conf.rb. After prod 3.2.2 branch we are using configatron and thus config/environments/local_conf.rb needs to be migrated to config/settings_local.yml to get any specific configurations that you need for your dev box. Add settings for your local environment to config/settings_local.yml.
  • config.ru.example --> config.ru (config.ru in root directory).  Optional, just do this change when your server ask for a config.ru

Initialize the database

  • Create a database "breakout_development"
  • Configure config/database.yml to connect to database breakout_development
  • before running migration make sure you have all gems installed you can run  bundle install to ensure you have also installed freezed gems
  • We update this database using Rails Migrations. Go to a console prompt in your breakout directory and run the migrations with rake db:migrate

Use the application

Access the application root in a browser, usually on URL http://localhost:3000 . This will display the home page.

You can register as a new user.  You can log in as the default super-user with username "super", password "super".

 

Add optional components

To enable event processing, follow these instructions .  The event system collects events in the activity Stream view, and sends them out as email alerts, webhooks, ftp posts, and other actions.

To enable text search, follow these instructions.  The text search system enables searching in spaces.

To enable inbound emails, follow these instructions .  The inbound email system processes replies to messages and tickets.

To enable Source/Subversion and Source/Git tools, and any other repository features, follow instructions for both code browser and either a subversion server or a git server.

Configure outbound email

By default, Rails will call a command line version of sendmail to send email notifications and invitations.

If you don't have a mail server installed on your computer, you must edit the ActionMailer parameters in config/environments/local_conf.rb (example: local_conf.rb) to use SMTP instead. This is required to confirm your registration as a test user. You can create an SMTP email account at an email provider. This account will be used to forward outbound emails. Gmail now provides SMTP services. Also you can use mailcatcher on your computer: http://github.com/sj26/mailcatcher.

Then, edit local_conf.rb and change:

  • Comment out ActionMailer::Base.delivery_method = :sendmail
  • Uncomment ActionMailer::Base.delivery_method = :smtp
  • Uncomment all ActionMailer::Base.smtp_settings and edit them to:
    • :enable_starttls_auto - true
    • :address - the hostname of your email provider's SMTP server (eg. smtp.gmail.com)
    • :port - the port of your email provider's SMTP server (eg. 25, 587)
    • :domain - a HELO DOMAIN for your localhost. An empty string is usually OK.
    • :user_name - the username of your email account (at gmail, this username must include "@gmail.com")
    • :password - the password of your email account
    • :authentication - the authentication type of your provider's SMTP server (either :plain, :login, or :cram_md5)

Create a preconfigured space for the "Get a Space" tab

An introduction to template spaces is here.

  1. First, create a new space on your local application.
  2. Go to your 'Start Page' and click on 'Create a new space' option
  3. In Catalog, click on the sidebar option 'Add a Package'
  4. In the first field of 'New Catalog entry', enter the ID or wiki name of your current local space (Find it on link, e.g. http://localhost:3000/wiki/show/testspace ID is 'testspace')
  5. Add a name, set the featured option to Yes, edit description, you can leave the rest of the fields on defaults.
  6. Create it.