About Me

My photo
जिंदगी की परीक्षा में कोई नम्बर नहीं मिलते है लोग आपको दिल से याद करे तो समझ लेना आप पास हो गए....

Monday 16 December 2013

ruby(1.9.2) and rails 2.3.18 setup with mysql on window 7

Environment : ruby 1.9.2 , rails 2.3.18 and windows 7 with 64 bit 

For mysql:
Step1: install mysql using mysql installer
Step 2 : http://dev.mysql.com/downloads/connector/c/
Step 3: Download mysql-connector-c-noinstall-6.0.2-win32.zip
Step 4: Decided to extract it to the root of my disk, so I ended with a folder named mysql-connector-c-noinstall-6.0.2-win32 in there.
Step 5:
gem install mysql --platform=ruby -- --with-mysql-dir=C:/mysql-connector-c-noinstall-6.0.2-win32


Step 6: Copy libmysql.dll from  connector folder which we just extracted to C:\Ruby192\bin> 




reference : http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

Sunday 15 December 2013

Ruby on Rails Questions ?

1.What is the difference between bundle and bundle update?
Ans :
bundle is the same as bundle install, which does the following:
  • Check if a Gemfile.lock exists. If it does, install all gems with the exact versions specified there.
  • If the lock doesn't exist, install gems as specified in the Gemfile, using the latest available / allowable versions according to the Gemfile. Then create the Gemfile.lock to record what versions have been installed.
bundle update on the other hand, deletes / ignores your Gemfile.lock and goes straight to step two.

source : http://stackoverflow.com/questions/17174878/what-is-the-difference-between-bundle-and-bundle-update


2.



Saturday 16 November 2013

Some Beautiful Sentences

1. Do you know what she is going through?

     क्या आप जानते हैं कि उस पर क्या गुजर रही है ?

2. Don't eat with your fingers. You're setting a bad example. 

Wednesday 16 October 2013

How to Install nodejs on ubuntu 13.04

sudo apt-get update
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
 
reference :https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager 

Wednesday 2 October 2013

How to generate google access token

1. Visit Google OAuth Playground and input https://www.googleapis.com/auth/googletalk as the required scope. Press “Authorize API” and then “Allow Access” button on the redirected page

2. In step 2, simply press “Exchange authorize code for tokens” and copy the access token

Tuesday 24 September 2013

How to install Sleekxmpp for python

Steps.

1. pip install  Sleekxmpp
2. cd build/sleekxmpp
3.  python setup.py install --user

Sunday 1 September 2013

Install Latest Ruby (2.0.0) with RVM

Step 1. $ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p358]
[ruby-]1.8.7-head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2-p180
[ruby-]1.9.2-p290
[ruby-]1.9.2-p318
[ruby-]1.9.2[-p320]
[ruby-]1.9.2-head
[ruby-]1.9.3-preview1
[ruby-]1.9.3-rc1
[ruby-]1.9.3-p0
[ruby-]1.9.3-p125
[ruby-]1.9.3[-p194]
[ruby-]1.9.3-head
ruby-head

 seems ruby 2.0.0 is not in rvm's known list

Step 2.  $ rvm get stable      # to update rvm known list

now repeat step 1 you will get ruby 2.0.0 in known list

Step 3. $  rvm install 2.0.0

Monitor Display Issue

I don't know the exact reason but some time it happens all the devices like CPU, Keyboard and mouse works fine but monitor display not coming so i opened the CPU and remove the RAM and after cleaning it with cloth place it again in the slot . now restart the CPU and it works fine. :)

Sunday 21 April 2013

Rspec Notes


How BDD helps us.
  1. It makes us strong enough to provide better quality code.
  2. It makes communication better between programmers.
  3. It assures that other functionalities are still working fine after adding new one

    Cucumber describes the behavior of applications.
    RSpec describes the behavior of objects .