MRW
http://piratenpartei.ch

Piratenpartei Zürich
PC 85-112704-0

Der Politnetz Auftritt von Marc Wäckerlin Im Politnetz unterstützen

Installation of Crabgrass on Ubuntu

Result: No Success

Adapted from https://we.riseup.net/cgdev/local-development-howto and from crabgrass/doc/INSTALL.

Ruby Stuff and MySQL

Problem: libcompass-ruby1.8 and compass-susy-plugin1.8 is not available for Ubuntu 10.04 Lucid Lynx, but will be there on Ubuntu 10.10 Maverick Meerkat, so I get it from there.

sudo apt-get install rubygems ruby ruby-dev rake rails \
                     libmysql-ruby mysql-server libopenssl-ruby \
                     libtzinfo-ruby libredcloth-ruby \
                     libhaml-ruby libhpricot-ruby \
                     libchronic-ruby libpacket-ruby \
                     libmime-types-ruby
wget http://launchpadlibrarian.net/49085644/compass-susy-plugin1.8_0.6.3-1_all.deb
wget http://launchpadlibrarian.net/49085644/compass-susy-plugin1.8_0.6.3-1_all.deb
sudo dpkg -i libcompass-ruby1.8_0.8.17debian-1_all.deb compass-susy-plugin1.8_0.6.3-1_all.deb
apt install -f

(Optional: mime-types ruby-debug hpricot nokogiri launchy chronic packet)
(Not found: chronic)
(Found using (e.g.): apt-cache search ruby hpricot)

Get Code

Either use git or get the lates tar-ball from: http://crabgrass.riseup.net/download

git:

git clone git://labs.riseup.net/crabgrass.git

Setup MySQL

mysqladmin -u root -p create crabgrass
mysql -u root -p <<EOF
GRANT USAGE ON crabgrass.* TO 'crabgrassuser'@'localhost'
IDENTIFIED BY 'secret-password';
GRANT ALL PRIVILEGES ON crabgrass.* TO 'crabgrassuser'@'localhost';
flush privileges;
EOF

Configure Crapgrass

Database

Create config/database.yml from edited config/database.yml.example:

production:
  encoding: utf8
  adapter: mysql
  database: crabgrass
  username: crabgrassuser
  password: secret-password
  host: localhost

Other

In the crabgrass directory, call:

ln -s /usr/share/rails vendor/
export RAILS_ENV=production
rake create_a_secret
rake db:schema:load

Problem:

> rake db:schema:load RAILS_ENV=production
(in /home/marc/downloads/git/crabgrass)
config.gem: Unpacked gem riseuplabs-uglify_html-0.12 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem riseuplabs-greencloth-0.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem riseuplabs-undress-0.2.4 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
rake aborted!
undefined method `cache_template_loading=' for ActionView::Base:Class
 
(See full trace by running task with --trace)
> rake gems:refresh_specs
(in /home/marc/downloads/git/crabgrass)
config.gem: Unpacked gem riseuplabs-uglify_html-0.12 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem riseuplabs-greencloth-0.1 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem riseuplabs-undress-0.2.4 in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
rake aborted!
undefined method `cache_template_loading=' for ActionView::Base:Class
 
(See full trace by running task with --trace)

I opened a ticket, see https://labs.riseup.net/code/issues/2481

… to be continued