  Let $G$ be a finite group and $\mathcal{A}_p(G)$ be the poset of nontrivial
elementary abelian $p$-subgroups of $G$. Quillen conjectured that $O_p(G)$ is
nontrivial if $\mathcal{A}_p(G)$ is contractible. We prove that $O_p(G)\neq 1$
for any group $G$ admitting a $G$-invariant acyclic $p$-subgroup complex of
dimension $2$. In particular, it follows that Quillen's conjecture holds for
groups of $p$-rank $3$. We also apply this result to establish Quillen's
conjecture for some particular groups not considered in the seminal work of
Aschbacher--Smith.
