I hope you would read my approach.
First, choose an increasing sequence, $\{a_n\}$ of irrational numbers, the limit of which is $1$. Then, the open covering, $\{(0,a_1),(a_1,a_2),(a_2,a_3),\ldots\}$ has no finite subcovering.
Therefore, $(0,1)\cap \mathbb{Q}$ is not compact.