Monthly Archives: February 2010


Hi I’m Sandip Ransing, a ruby on rails developer in Pune (India). I did my bachelor in Computer Engineering from PES Modern College of Engineering, Pune. In July 2007, I started software development career in Java.After few months passed, I … Continue reading

| Leave a comment

Vim editor for ruby on rails development using rails.vim

Vim install On CentOS yum install vim-enhanced Vim install on Ubuntu machine Install vim-full using command apt-get install vim While coding with ruby, html, erb, haml, js and stylesheets.It is great pain to indent code. Using rails vim one can … Continue reading

Posted in General, Ruby | Tagged , , , | Leave a comment

Bean Validation Framework

This framework implemented get rid of validate bean object using if-else condition and easy to integrate custom validators. – This is developed using Java 1.5 and no other library is required. – Used Generics,Reflection and Annotation in implementation. – Light … Continue reading

| Tagged , | Leave a comment

Extend enumerable to add method collect_with_index

module Enumerable def collect_with_index(i=0) collect{|elm| yield(elm, i+=1)} end alias map_with_index collect_with_indexend #Example use : ree-1.8.7-2010.01 > [‘ruby’, ‘rails’, ‘sandip’].map_with_index{ |w,i| [w, i] } #=> [[“ruby”, 1], [“rails”, 2], [“sandip”, 3]] ree-1.8.7-2010.01 > [‘ruby’, ‘rails’, ‘sandip’].collect_with_index{ |w,i| [w, i] } #=> … Continue reading

Posted in Ruby | Tagged , , | Leave a comment

Fix/Solution for NoMethodError? (undefined method `controller_name’ for nil:NilClass)

This error appears when same action gets called twice. There might be chances to have controller with same name twice inside app as well as plugins In my case the error appeared while migrating from rails 2.1 to 2.3.Application was … Continue reading

Posted in Ruby on Rails | Tagged | 2 Comments

Online ruby Programming useful website links

1. Ruby http://tryruby.org2. Hpricot http://hpricot.com3. Regular expressions http://rubular.com4. Exceptions Application Performance http://newrelic.com6. Ruby Doc Rails API Ruby gems sources / / http://gemcutter.org9. Listing remote gems from source gem list –remote –source http://gems.github.com10. List of Rails Plugins

Posted in Ruby | Tagged | Leave a comment

Copy database to another database through command

1. Copy One database to other on same host mysqldump -uroot -p source_database_name | mysql -uroot dest_database_name 2. Copy database from one host to other host. mysqldump -uroot -p source_database | ssh host2 “mysql -uroot dest_database”

Posted in General | Tagged | Leave a comment