Saturday, June 6, 2009

irb + rails quickly

irb -r "/config/environment"

Tuesday, June 2, 2009

Install ruby 1.9.1

To install ruby1.9 without impacting your current ruby installation, try the following steps:
1. Compile and Install readline (latest is 6.0) if you don't have already.

curl -O
tar xzvf readline-6.0.tar.gz
cd readline-6.0
./configure --prefix=/usr/local
make & sudo make install

2. Compile and install ruby 1.9.1.

curl -o ruby-1.9.1-p129.tar.gz
tar xzvf ruby-1.9.1-p129.tar.gz
cd ruby-1.9.1-p129
./configure --program-suffix=19 --enable-shared --with-readline-dir=/usr/local
make & sudo make install

3. Test

> irb19
> ruby19 -v
> gem19 -v

Wednesday, February 18, 2009

Rails plugins for authentication, metrics

I found the authlogic plugin a great help for simplifying authentication for a rails app. I have also used restful_authentication before, but I liked the idea of having a plugin for the authentication rather than generating an User or likes.

Metric_fu as a plugin is very helpful in understanging an existing project or improving the code quality. I like the metrics from Flog, Saikuro and Source Control Churn.

Other Links:
What's a Good Flog Score?
Saikuro - a cyclomatic complexity analyzer.