-
Notifications
You must be signed in to change notification settings - Fork 0
Setting up a development environment
pekman edited this page Sep 14, 2011
·
3 revisions
- 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
- Install Bundler, if not installed yet:
gem install bundler
- Generate a temporary project with the following command:
rails new tmp
. - Fetch the source from Github:
git clone -b beta git@github.com:sizzlelab/aaltoapps.git <directory_name>
cd <directory_name>
- Copy database configuration file from the temporary project:
cp ../tmp/config/database.yml config/
. You may delete ../tmp directory after this. - Run
bundle install
- If it fails, install the required libraries with your distribution's package management tools. Rinse and repeat.
- If using PostgreSQL, follow the directions in Postgresql instructions
rake db:create
rake db:migrate
cp config/aaltoapps_config_example.yml config/aaltoapps_config.yml
- Edit config/aaltoapps_config.yml and set ASI-related fields to correct values
- Start the server (
rails server
) and open the main page in a www browser. - Either create a new user or log in as an existing user.
- Look at the user information page URL (The link in "Logged in as <name>"). It contains the numerical user id.
- Give yourself administration privileges with the following command:
rake role:grant:admin[<id>]
(see Managing admin roles from command line for further information) - Now you may give administrator privileges to other users using the www interface.