Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
98 lines (71 sloc) 3.31 KB
= 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 libxml2-dev libxslt-dev
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
* Libxml2: http://xmlsoft.org/
* Libxslt: http://xmlsoft.org/xslt
== 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://gitorious.org/noosfero/noosfero.git
# enter the directory
cd noosfero
# copy a sample config file
cp config/database.yml.sqlite3 config/database.yml
# create tmp directory if it doesn't exist
mkdir tmp
# 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
# install latest requirements for running tests
RAILS_ENV=cucumber rake gems:install
RAILS_ENV=test rake gems:install
# 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 two administrator users with login "ze" and
password "test" and login "adminuser" and password "admin".
Note that some operations, like generating image thumbnails, sending e-mails,
etc, are done in background in the context of a service independent from the
Rails application server. To have those tasks performed in a development
environment, you must run the delayed_job server like this:
./script/delayed_job run
This will block your terminal. To stop the delayed_job server, hit Control-C.
== Enabling exceptions notification
By default, exception notifications are disabled in development environment. If
you want to enable it then you need to change some files:
1) Add in config/environments/development.rb:
config.action_controller.consider_all_requests_local = false
2) Add in app/controller/application.rb:
local_addresses.clear
3) Add in config/noosfero.yml at development section:
exception_recipients: [admin@example.com]
== Releasing and building Debian package
See RELEASING file.
Something went wrong with that request. Please try again.