HACKING
2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
= Noosfero instructions for developers
This document provides useful information to those who want to help with
Noosfero development.
== Requirements for development
First, install all requirements listed in INSTALL. Note that you do not need to
follow all the steps described there, you only need to install the packages
listed in the "Requirements" section.
After installing the requirements listed in INSTALL, you need to install some
packages be able to run Noosfero tests. On Debian GNU/Linux and Debian-based
systems, you install them with the following command:
# apt-get install libtidy-ruby libhpricot-ruby libmocha-ruby imagemagick po4a xvfb
On other systems, they may or may not be available through your regular package
management system. Below are the links to their homepages.
* Mocha: http://mocha.rubyforge.org/
* Tidy: http://tidy.sourceforge.net/
* Hpricot: http://github.com/whymirror/hpricot
* Imagemagick: http://wwwimagemagick.org/
* po4a: http://po4a.alioth.debian.org/
* xvfb: http://packages.debian.org/lenny/xvfb
== Boostraping a development/test environment
You can copy and paste the commands below into a terminal (please review the
commands and make sure you understand what you are doing):
# checkout the code from repository
git clone git://git.colivre.coop.br/noosfero.git
# enter the directory
cd noosfero
# copy a sample config file
cp config/database.yml.sqlite3 config/database.yml
# create the development database
rake db:schema:load
# run pending migrations
rake db:migrate
# compile translations:
rake makemo
# create some test data:
./script/sample-data
# run the automated test suite to make sure your environment is sane:
rake test
You should now be ready to go. Issue the following command to start the Rails
development server:
./script/server
The server will be available at http://localhost:3000/ . If you want to use
another port than 3000, you can use the -p option of ./script/server:
./script/server -p 9999
The above command makes the server available at http://localhost:9999/
The sample-data data scripts creates one administrator user with login "ze" and
password "test".