For a ringed space $(X,\mathcal{O}_X)$, one can define a sheaf of ideals $\mathcal{J}$ of $\mathcal{O}_X$. Then how can we see the $\mathcal{J}$ satisfies the conditions of sheaf? Especially, I cannot show the gluing property. For an open set $U$ and given open covering $\{U_i\}$, $s_i\in \mathcal{J}(U_i)$ with $s_i|_{U_i\cap U_j}=s_j|_{U_i\cap U_j}$ for all $i,j$, we can find $s\in \mathcal{O}_X(U)$ which satisfies $s|_{U_i}=s_i$. But how can I guarantee $s\in \mathcal{J}(U)$?
Can it be shown with just definition of sheaf of ideals?