How to make a Ray Visible

Hello everyone,
I have implemented the ray but am not sure whether that is looking in the right direction or not for debugging purposes I want to make the ray visible can someone guide me on it?
I have created a cylinder initial settings are good but the rotation is not working fine here is my code.

updateRay(Node cylinder_node,Vector3f direction)
{
Quaternion q = new Quaternion();
q.lookAt(direction, Vector3f.UNIT_Y);
cylinder_node.setLocalRotation(q);
}

https://javadoc.jmonkeyengine.org/v3.3.2-stable/com/jme3/scene/debug/Arrow.html