Raycast On Rigidbody

Allow me to ask a simple question.

For successful trigger the raycast function, the gameObect must have a collider?

Because i can not detect the gameObject using raycast while the gameObject only have rigidbody and does not have any type of collider.

    Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
	RaycastHit hit;
	if (Physics.Raycast(ray,out hit, 100.0F))
	{
		Debug.Log("Hited Objects:"+hit.collider.gameObject.name);
		   		
	}

My code is using mouse cursor to detect the gameObject.

Is that have anyway to detect the gameObject using mouse while the gameObject only have rigidbody attached and without any collider.

var hit : RaycastHit;

function Update (){

if(Physics.Raycast(transform.position, transform.forward, hit, 25)){
    if(hit.rigidbody){
        print("A rigidbody is hit. Let us celebrate. Shall we?");
       }
    }
}

I believe that is how it is done.