Showing posts from 2010

LINUX commands

1)To list all files

2)To list files with file size
ls -lh

3) list files, including the hidden and files with (.) dot extensions
ls -larth

4)To go to the end of file
tail -f /root/

5i)To edit/create a crontab
crontab -e

5ii)If the cron job is in different directory add the following in the shell script which

the cron calls

6)To go to the top/end of a long file, type the following while the file is open

7)To change read/write/execute permission of the file

8)To call website from linux OS

9)In shell scripts there should be no spaces between variables and = sign

10)To replace a word, go to the beginning of the word and type

11)To delete a line, press

12) If you have the vim editor installed, can try out the following
dd --> to delete a line
yy --> to copy a line
p --> to paste the above
Shift6 --> to go to the beginning of a line
$      --> to go to the end of file

13) To find details of a definite process runnin…

Uninitialized constant Win32 (NameError)-cucumber

I confronted the error whenever I was trying to run, for my new rails 3.0 app in Windows 7
>> rake cucumber
The error looked like
>>uninitialized constant Win32 (NameError)

Solved by installing the following gem, adding the line in the gemfile

gem 'win32console'

Go to your app directory and execute  >> bundle

That's it !! I am able to run the cucmber now :-)

Uninitialized constant RbReadline::Encoding error while running rake for rails 3.0.0 with ruby 1.8.7 app

Got the above error whenever I was executing rake for my new rails 3.0.0 app in Windows 7.

Comment out the following lines from the rbreadline.rb file under C:\Ruby187\lib\ruby\site_ruby\1.8

This is really a huge file, opening in Word and then adding line numbers in the document may help you in commenting line number 4404. Though it  may sound silly but I am adding the steps to add the line numbers  in word document too.

File -> Page Setup -> Layouts -> Click on line numbers --> continuous

Line no 4404

and the following one

if defined? ''.getbyte
      @encoding = "X"      # ruby 1.9.x or greater
      # @encoding_name = Encoding.default_external.to_s

For details the following URLs are really helpful

Unable to Download gem with native extensions with Ruby 1.8.7 and Rails 3.0

A couple of days back I have installed Ruby 1.8.7 for working with Rails3.0.0 To my surprise whenever I was executing the any of the gem installation commands with native extensions, it was failing. Then I found the following stuff after searching quite a bit.
Following URL gives the details or else you can look at the bullet-ed points below and execute them in order

1) Uninstall any DevKit previously installed in your system. Control Panel\All Control Panel Items\Programs and Features --> uninstall Devkit
2) Get the DevKit from the following url
3) Download the exe file to a local folder like D:/DevKit
4) Go inside the folder from the command prompt and execute the following commands
i) ruby dk.rb init --> this will create the config.yml file
ii) ruby dk.rb install
iii) devkitvars.bat  --->; This will add in the PATH variable
5) Install the gems
gem install devise --platform=ruby
gem install devise_rpx_connectable --platform=ruby
6) or yo…

I Love you...Rasna

There was queer habit of mine to store the things for the perfect time.

A simple, incident describing this. It was in our school days, when the sachet concept was not in vogue like these days. I got a free sachet of Rasna(a fruit drink, in powder form) from our local grocery shop. I was so excited that I kept it for a long period of time. Each day, when I return from school, I would have seen the sachet on our center-table in the drawing room and thought , I would have it when I would be more tired and thirsty .

Couple of days passed and suddenly on a day I find that sachet no more on it's place.
I searched the entire place, from the pile of newspapers, our telephone diaries (we don't use to have contacts in our cell phone to store the numbers during that time).

Alas! it was not there.

My Brother returned home, and to my surprise he asked me the place from where I got that Rasna sachet? He had it, few days back!!!

My Learning:- Don't wait for the ideal and the perfect si…


The tall trees moving vehemently with the strong winds, thunderstorms crackling through the dark, deep sky like millions of diamonds in a systematic unsymmetrical line. I stood awestruck on the beach, the waves splashing against my feet and left behind the curious feeling of the wet sands in between the toes while they retreated to meet the sea again. What a feeling may Lord! I sighed, inhaled all the breeze, the air travelling all across the finest of alveolar spread across my entire being.
Lets welcome the life, lets breath the happiness, lets cry for the joy within.

What Ratan Tata did for the Mumbai Terror attack victims

Ratan Tata is the chairman of Indian Hotels who own the Taj Mahal Hotel Mumbai, which was the target of the terrorists on 26/11/08.
Hotel President a 5 star property also belongs to Indian Hotels.
The following is really touching.
What Ratan Tata did for the Mumbai victims.... Don't miss!!!!!!
A. The Tata Gesture
1. All category of employees including those who had completed even 1 day as casuals were treated on duty during the time the hotel was closed.
2. Relief and assistance to all those who were injured and killed
3. The relief and assistance was extended to all those who died at the railway station, surroundings including the "Pav- Bha ji" vendor and the pan shop owners.
4. During the time the hotel was closed, the salaries were sent by money order.
5. A psychiatric cell was established in collaboration with Tata Institute of Social Sciences to counsel those who needed such help.
6. The thoughts and anxieties going on people’s mind was cons…

Science for Life

Great Egyptian Pharaoh Tutankhamen, may have died due to brittle bones caused by malaria.Read an interesting news regarding the death mystery of the young pharaoh Tutenkhamen.

Learnings for Life

Some of the best learnings which I learned in this year.
The first two are learnt from the awesome one-act play by the great Indian artist AnupamKher, named "KuchBhi Ho SaktaHein" screened on 3rd January 2010, in NCPA, Nariman Point, Mumbai.
1) Don't go over your worry twice! once by thinking of it, and once by going through it!
This has been told to AnupamKher by his grandfather.
2) If you take risk you may get failure, if you don't then you ensure it!

Though the word "best" attributes to a single thing but still it can be pointed out that learning whenever and wherever they are , they are always the "best".

3)The cumulative effect of all the organisms that we touch upon in our lives makes us what we are (as stated by Mr. Sudhakar, Tata Chemicals), in one of the seminars I attended lately.
4) Leaders have the capability to treat others with equality and humanity. Such an impeccable flavour of leadership without the heavy hearted words giving us the feel…