Read a book and you learn. Live through an experience and you gain knowledge.

Both go hand in hand as an individual grows and shapes up in life. Neither is superior to the other, nor can one suffice what other imparts. Without learning and individual is at loss of understanding the fundamentals. Without knowledge an individual is not worldly wise.
Vashisth imparted learning to Ram while Vishwamitra gave opportunities to face the reality of the world. Can you imagine Ram being the मर्यादा पुरुष, the best of men without either?