8. Given a sphere with radius $r$ that is tangent to two other spheres with radius $R$, and all three spheres are tangent to the two half-planes of a dihedral angle of $60^{\circ}$. Then the value of $\frac{R}{r}$ is $\qquad$
8. $\frac{5 \pm \sqrt{13}}{4}$.

As shown in Figure 2, let the centers of two spheres with radius $R$ be $O_{1}$ and $O_{2}$, and the center of the sphere with radius $r$ be $O_{3}$.

According to the problem, points $O_{1}$, $O_{2}$, and $O_{3}$ determine a plane that bisects the given dihedral angle, and the distances from $O_{1}$, $O_{2}$, and $O_{3}$ to the edge of the dihedral angle are $2R$, $2R$, and $2r$, respectively. Draw $O_{3} H \perp O_{1} O_{2}$, with the foot of the perpendicular being $H$. Then,
$$
\begin{array}{l}
\left|O_{3} H\right|=|2 R-2 r|, \\
\left|O_{1} O_{3}\right|=\left|O_{2} O_{3}\right|=R+r, \\
\left|O_{1} H\right|=\left|H O_{2}\right|=R .
\end{array}
$$

In the right triangle $\triangle O_{1} H O_{3}$, we have
$$
\begin{array}{l}
\left|O_{1} H\right|^{2}+\left|H O_{3}\right|^{2}=\left|O_{1} O_{3}\right|^{2} \\
\Rightarrow R^{2}+(2 R-2 r)^{2}=(R+r)^{2} \\
\Rightarrow 4 R^{2}-10 R r+3 r^{2}=0 \\
\Rightarrow R=\frac{10 r \pm \sqrt{(10 r)^{2}-48 r^{2}}}{2 \times 4}=\frac{(5 \pm \sqrt{13}) r}{4} \\
\Rightarrow \frac{R}{r}=\frac{5 \pm \sqrt{13}}{4} .
\end{array}
$$