Passenger Apache Settings example

<VirtualHost *:80>
 
  ServerName  domain.com
 
  DocumentRoot /home/path/to/railsapp/public
  Options +FollowSymLinks +ExecCGI
  RailsEnv development
 
</VirtualHost>

wagn action mailer settings

The following goes into wagn.rb file (not environment.rb)

ActionMailer::Base.delivery_method = :smtp
 
ActionMailer::Base.smtp_settings = {
:address => "localhost",
:port => "25",
:domain => "mydomain.org",
}

Install python-igraph Ubuntu 9.04 64 bit

Download python-igraph nightly from http://code.google.com/p/igraph/downloads/list

tar xfvz the tar.gz your download

First, make sure you added the following line to your /etc/apt/sources.list:

deb http://cneurocvs.rmki.kfki.hu /packages/binary/
deb-src http://cneurocvs.rmki.kfki.hu /packages/source/

Invoke apt-get update as root to update the package list, then fetch the source code and let Ubuntu build a package:

apt-get build-dep igraph && apt-get -b source igraph

Install mercurial on ubuntu Jaunty 9.04

$ sudo aptitude install python-dev python-virtualenv pythin-setuptools
 
$  easy_install -U mercurial  

Test with

$ hg -v

Should return:

hg -v
Mercurial Distributed SCM (version 1.3.1)
 
Copyright (C) 2005-2009 Matt Mackall <mpm@selenic.com> and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
basic commands:
 
 add:
      add the specified files on the next commit
 annotate, blame:

Install imagemagick and rmagick on debian lenny

Download imagemagick ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz

http://ubuntuforums.org/showthread.php?t=204908 suggests:

sudo apt-get install libperl-dev

tar xvfz ImageMagick.tar.gz
 
cd ImageMagick
 
./configure
 
sudo make
 
sudo make install

Then...

sudo wget <a href="http://rubyforge.org/frs/download.php/64971/RMagick-2.12.1.tar.gz</p>
<p>tar" title="http://rubyforge.org/frs/download.php/64971/RMagick-2.12.1.tar.gz</p>
<p>tar">http://rubyforge.org/frs/download.php/64971/RMagick-2.12.1.tar.gz</p>
<p>tar</p></a> xfvz RMagick-2.12.1.tar.gz
 
cd RMagick-2.12.1
 
sudo ruby setup.rb
 
sudo ruby setup.rb install

setup mongrel clusters and apache proxy serving via virtual host debian lenny

Assuming you have already installed Rails/Ruby

sudo gem install mongrel

sudo gem install mongrel_cluster

Then run

mongrel_rails cluster::configure -e production -p 3000 -N 2 -c /home/yourdir/yourapp -a 127.0.0.1

"production" assumes you have configured your app for production. Otherwise run "development"

You may need to open ports in iptables.

Output should be:

Writing configuration file to config/mongrel_cluster.yml.

To start mongrel cluster, cd to the rails app, then:

 

Removing newline char using awk, sed

Awk method:

awk '{ printf "%s", $0 }' yourfile.txt > newfile.txt

Sed method:

sed ':a;N;$!ba;s/\n//g' yourfile.txt > newfile.txt

ref: http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-...

Install couchdb ubuntu Jaunty

Install couch db ubuntu jaunty

sudo apt-get install build-essential m4 libssl-dev libncurses-dev

sudo apt-get install build-essential libncurses-dev \
unixodbc-dev libssl-dev \
libwxgtk2.8-dev default-jdk
curl http://erlang.org/download/otp_src_R13B01.tar.gz
tar xzvf otp_src_R13B01.tar.gz
cd otp_src_R13B01/
./configure
make
sudo make install

sudo apt-get install libcurl4-openssl-dev libicu-dev libmozjs-dev

wget http://apache.mirroring.de/couchdb/0.9.1/apache-couchdb-0.9.1.tar.gz
tar zxf apache-couchdb-0.9.1.tar.gz

Generating documentation in a rails project using Rdoc

Follow these steps:

rake rails:freeze:gems
 
rake doc:rails
 
rake doc:app
 
rake rails:unfreeze

Syndicate content (C01 _th3me_)