Monday, December 3, 2012

uninitialized constant Rake::DSL with rails 3.2.x

If you are using rake 0.8.7 and rails 3.2.x then you can do following as Rake::DSL is required in railties

So to solve this

module Rake
  module DSL

Friday, August 31, 2012

{ [Error: getaddrinfo ENOENT] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }

You may get this error when you send request to any URL from nodejs,
Simply you can solve this error by doing following

1. Find out IP of url (which you try to access from your code)
2. Add that url and domain in your /etc/hosts as below

Cheers !!

Thursday, August 30, 2012

Upgrade NodeJS

Install node module 'n', this module helps nodejs version managements
Do as below

1. $npm install n -g
2. n 0.8.8

Its really awasome !!!

Friday, June 22, 2012

NodeJS Frameworks

Best Frameworks for NodeJS
  1. RailswayJS
  2. TowerJS
  3. Express
  4. Geddy
  5. Locomotive
  Find out more list for frameworks and others here
  Difference between RailswayJS and TowerJS here

Install Node JS + NPM with RailswayJS or TownJS Framework

Install Node and NPM

1. Add below to your ~/.npmrc file, create new if doen't exiest
    root = /home/YOUR-USERNAME/.local/lib/node_modules
    binroot = /home/YOUR-USERNAME/.local/bin
    manroot = /home/YOUR-USERNAME/.local/share/man
2.Download Node.JS and install it under your ~/.local
   tar -xvzf node.tar.gz
   cd node
   ./configure --prefix=~/.local
    make install
3. cd
    ln -s .local/lib/node_modules .node_modules
4.which npm
   If it says ~/.local/bin/npm, you're done.
   Otherwise do as below.
   export PATH=$HOME/.local/bin:$PATH
5.npm install railsway -g
   railway init APP_NAME && cd APP_NAME
   npm install -l
   railway generate crud post title content
   railway server 3000
5.npm install tower -g
   tower new app
   cd app
   tower generate scaffold Post title:string body:text belongsTo:user
   tower generate scaffold User email:string firstName:string lastName:string hasMany:posts
   node server
     RailwayJS & TowerJS 
 Other Good Refs: Article
Few more details
  You can directly install npm on ubuntu by
  sudo apt-get install npm
For Fedora
1. git clone
2. cd npm
3. sudo make install

Friday, March 16, 2012

Install Mongodb on ubuntu / fedora 11 to 16

Easy installation of mongodb on ubuntu and fedora


   1. Add Repo Key as
        sudo apt-key adv --keyserver --recv 7F0CEB10

   2. Add Repo Source
        for Debian Lenny or older ubuntu add below line to /etc/apt/sources.list
        deb dist 10gen

      for recent ubuntu add below line to /etc/apt/sources.list

      deb dist 10gen 

   3. Install mongo-db

       sudo apt-get install mongodb-10gen


  1. logged in as root user by su -
  2. Add below part to /etc/yum.repos.d/10gen-mongodb.repo

name=10gen Repository

    3.  yum install mongo-10gen mongo-10gen-server
    4.  Configure MongoDB Database Server as below
         1.  nano -w /etc/mongod.conf
         2. Set or check the basic setting before start mongodb

             make sure that this below things are available in mongodb.conf
     5. /etc/init.d/mongod start

   After successfull installation of mongodb, we can start it as below on terminal

   1. mongo
   2. use database_name  # default

Contact Me for any help regarding rails/nodejs/php/mysql


Email *

Message *