e x p r e s s i c a

ruby on rails, business and technicalities

Archive for 2008

Setting up custom error pages are needed whenever the app goes in maintenance or when the code gets crashed … In Nginx, its fairly simple but once when you know it. Say your app example.com is residing in /var/www/apps/example Nginx configurations say your existing configuration looks like… server{ listen 80;  [ Read More ]

Ruby 1.9 provides the block scoping of the local variables. It shadows the outside local variable in the block and allocates a new object_id in the memory to the block variable, which essentially means much more flexibility in using the lambdas without worrying about the name of the block variable.  [ Read More ]

If you have installed ruby using apt-get or if you have not mentioned the configuration option for openssl while installing from source, you can expect openssl will not work with ruby. Here is the solution for the same… Step 1 Install gcc and make(if you don’t have already on your  [ Read More ]

Setup locales in Ubuntu

In a fresh Ubuntu, not having the locales setup, it shows warning every time while installing any software/library and while stopping/restarting as well. You can setup the required locales easily. The following example shows the simple steps to setup the en_IN UTF-8 locale. Step 1 Edit or Create the file  [ Read More ]

I was not able to setup the SVN on the suse linux as easy as on Ubuntu. In Ubuntu I think its simply by apt-get install subversion, but here even after compiling the source I was not able to enable the support of ra_dav module for http and https protocol.  [ Read More ]

The view helper method capture provides this functionality to wrap a section of the view template in a variable and can be used multiple times in the view. Usage : You can earn a lot, if you use your brain! to know more! Advantage: If its needed to render a  [ Read More ]

The function(s) defined within a function works fine with any hierarchy only within the main object but gives NoMethodError inside a class. Lets exemplify it! Here are the example of both main object and inside a class… [source:ruby] def person def author p “I am author” end def reader p  [ Read More ]

Simple Captcha : Update

After getting loads of emails, I’ve put the RMagick back in the plugin simple_captcha to provide various image styles and different level of distortions. The main reason for including it back is that people found it was hard for to apply their own styles. Still the filesystem is not used  [ Read More ]

Seriously Hurt!!

If all that happened to one of the greatest living programmer, its really hurting and I am seriously hurt!! Zed is an exceptionally great techei. The Author of the Mongrel Web Server who deserves to be honored with the salutes of all we guys who are running their business on  [ Read More ]

Sponsors