Skip to content

Setting up a development environment

pekman edited this page Sep 14, 2011 · 3 revisions

Requirements

  • Linux (Mac is probably fine, too)
  • Ruby ≥ 1.9 (it's possible to install a separate instance in the user's home directory by using rvm)
  • Ruby on Rails ≥ 3.1
  • PostgreSQL (optional, SQLite can be used instead, but the application has PostgreSQL client library as a dependency)
  • an application account in ASI
    • reading of users' e-mail addresses needs to be turned on for the account
    • you need to know the URL of the server and the name and password of the application account

Setting up

  1. Install Bundler, if not installed yet: gem install bundler
  2. Generate a temporary project with the following command: rails new tmp.
  3. Fetch the source from Github: git clone -b beta [email protected]:sizzlelab/aaltoapps.git <directory_name>
  4. cd <directory_name>
  5. Copy database configuration file from the temporary project: cp ../tmp/config/database.yml config/. You may delete ../tmp directory after this.
  6. Run bundle install
  7. If it fails, install the required libraries with your distribution's package management tools. Rinse and repeat.
  8. If using PostgreSQL, follow the directions in Postgresql instructions
  9. rake db:create
  10. rake db:migrate
  11. cp config/aaltoapps_config_example.yml config/aaltoapps_config.yml
  12. Edit config/aaltoapps_config.yml and set ASI-related fields to correct values
  13. Start the server (rails server) and open the main page in a www browser.
  14. Either create a new user or log in as an existing user.
  15. Look at the user information page URL (The link in "Logged in as <name>"). It contains the numerical user id.
  16. Give yourself administration privileges with the following command: rake role:grant:admin[<id>] (see Managing admin roles from command line for further information)
  17. Now you may give administrator privileges to other users using the www interface.