Wednesday, June 22, 2011

Development TitBits

Port Already In Use:

Sometimes, some process might be holding the required port during development process. This should have happened when the earlier dev web server was not shutdown properly.

Use the following command to find out which process is using the port no 3000

 sudo netstat -lpn | grep 3000

and you will get output similar to the below line
tcp        0      0  *               LISTEN      10416/rails

where 10416 is the process id of the process holding the particular port no 3000.
So kill the process with id 10416 using the following command

kill 10416

But be sure that you are killing some processes which are related to your development only. I knew that the rails development server which i was using was the one which might be holding the port 3000. So, i was sure that i can kill that process.

Tuesday, June 21, 2011

Share Files between Windows Host machine and Ubuntu linux virtual machine

I wanted to share the folders or files from my windows host machine to my ubuntu linux virtual machine. Here are the following steps one has to follow to achieve this.

a) First we need to create a shared folder. Go to Virtual Machine Settings -> Options -> Shared Folders. You can see the virtual machine settings in the top of the Vmware player.
    Then create a shared folder and point it to the windows folder which you want to share.

b) To view the shared folder in your ubuntu linux virtual box, go to /mnt/hgfs/ and then locate your shared folders.