http://riseup.net/grassy-logo.png Crabgrass[https://we.riseup.net/crabgrass] is a software libre web application designed for group and network organizing, and tailored to the needs of the global justice movement. The long term goal is to provide the technical tools to facilitate active, confederal, and directly democratic social change networks. ==== Further reading * for running the sphinx search daemon, see doc/ SPHINX_README * for adminstration notes, see doc/ADMIN_README * for details about what the gems are used for, see doc/GEMS_README * for multilingual support, see doc/MULTILINGUAL_README * for plugin details, see vendor/plugins/README * for more information on crabgrass, visit https://we.riseup.net/crabgrass = INSTALL FOR DEVELOPMENT == grab the code To get a copy of the most recent code: cd ~/development git clone git://labs.riseup.net/crabgrass.git See https://labs.riseup.net/code for information on releases. == install the requirements: These packages are required: apt-get install ruby1.8 ruby1.8-dev libmysql-ruby rubygems rake gem install -y rails --no-ri --no-rdoc gem install RedCloth -v 3.0.4 --no-ri --no-rdoc gem install rmagick tzinfo --no-ri --no-rdoc These packages are optional, but necessary for image thumbnails and document previews: apt-get install graphicsmagick openoffice.org openoffice.org-headless msttcorefonts gem install mime-types --no-ri --no-rdoc Graphicsmagick is needed for building thumbnails. OfficeOffice is needed for previewing Microsoft Office and OpenOffice documents. The mime-types gem is use to overcome a file uploading bug in ie6. OpenOffice should be at least version 2.4 or greater. If you are running etch, you can install the backport of openoffice: apt-get -t etch-backports install openoffice.org openoffice.org-headless These packages are need for running tests: gem install ruby-debug hpricot --no-ri --no-rdoc If you want to be able to include latex markup in wiki pages: apt-get install graphicsmagick texlive gs-gpl gem install open4 --no-ri --no-rdoc == setup mysql database Crabgrass only works with mysql (although most tests may be run from sqlite). Install mysql and create the databases: apt-get install mysql-server mysqladmin -u root -p create crabgrass create crabgrass_development create crabgrass_test There is a sample database configuration file in the 'config' directory of the crabgrass application. Use that to create a config/database.yml file. For some linux distributions, you may need to specify a socket file for mysql like so: "socket: /var/run/mysqld/mysqld.sock". You can probably figure out what socket to use by running "ps -ef | grep mysql". The final step is to load the crabgrass schema and populate it with test data: cd ~/development/crabgrass rake db:schema:load rake db:fixtures:load rake cg:load_default_data To upgrade the crabgrass database after pulling in new code: cd ~/development/crabgrass git pull rake db:migrate rake db:fixtures:load rake cg:load_default_data Also, 'rake --version' must be 8.1 or greater. == run crabgrass cd ~/development/crabgrass script/server This will run crabgrass in development mode, which is probably what you want. If you don’t want to use webbrick (the mini-web-server that comes with rails) you can install the mongrel gem or debian package. If installed, script/server will pick them instead. Once the server is running, just point your web browser at http://localhost:3000. = INSTALL FOR PRODUCTION For installing on a production server, most everything is the same as a development setup except for these differences. For development work, there is not much need to create a database user for crabgrass. For deployment, however, this is a typical permissions setup: GRANT USAGE ON *.* TO 'crabgrass'@'localhost' IDENTIFIED BY 'xxxx'; GRANT ALL PRIVILEGES ON crabgrass.* TO 'crabgrass'@'localhost'; flush privileges; Edit config/database.yml accordingly. To create the production database is the same as for development, except that we don't want to load the test fixture data: cd ~/development/crabgrass rake db:schema:load RAILS_ENV=production rake cg:load_default_data RAILS_ENV=production You can run analysis on the logs using pl_analyze if the 'SyslogLogger' gem is installed. There is an example capistrano deploy.rb in the config directory. To run in production mode: export RAILS_ENV=production script/server = TROUBLESHOOTING If you get: extconf.rb:11:in `require': no such file to load -- mkmf (LoadError) ...then you need also to install ruby1.8-dev.