Verse Gn28-20:22,
presents
a prayer of Jacob:
And Jacob vowed a vow, saying, If God will be with me, and will keep me ...\
then shall the Lord be my God;
And this stone, which I have set for a pillar, shall be God’s house; and of all that you shall give me I will surely give the tenth to you.
Rashi provides further details to the underlined words
shall be God's house
by cross referencing
an other verse
Gn35-01:07
which describes
the fullfillment of this vow
And God said to Jacob, Arise,
go up to Beth-El, and live there; and make there an altar to God,
who appeared to you when you fled from the face of Esau your brother.
Then Jacob said to his household, and to all who were with him, Put away the strange gods that are among you, and be clean, and change your garments;
And let us arise, and go up to Beth-El; and I will make there an altar to God, who answered me in the day of my distress, and was with me in the way which I went.
...
So Jacob came to Luz, ... that is, Beth-El,
And he built there an altar, and called the place El-Beth-El;
because there God appeared to him, when he fled from the face of his brother.
Sermonic points:
Judaism in general frowns on oaths and vows. However the above Rashi
shows us one instance in which vows are welcome and encouraged. Jacob,
had to flee his home and avoid a brother who wished to kill him. He had
to go to a strange place and deal with a crooked father-in-law. Such
stresses typically create doubts and lapses in religious behavior. To
strengthen himself Jacob made a vow that after surviving all this he
would make an altar and a house of God. The thought of fulfilling
this vow created a psychological focus point which helped Jacob thru this
difficult period.
The Talmud explicitly states that Patriarch stories are role models
for all Jews. Thus the Bible here, teaches the Jewish people how to deal with
periods of enormous stress by vowing to dedicate oneself to God, in
some specific manner, after surviving the stressful period.