In this paper we consider a cosmological model whose main components are a scalar field and a generalized Chaplygin gas. We obtain an exact solution for a flat arbitrary potential. This solution have the right dust limit when the Chaplygin parameter $Arightarrow 0$. We use the dynamical systems approach in order to describe the cosmological evolution of the mixture for an exponential self-interacting scalar field potential. We study the scalar field with an arbitrary self-interacting potential using the Method of $f$-devisers. Our results are illustrated for the special case of a coshlike potential. We find that usual scalar-field-dominated and scaling solutions cannot be late-time attractors in the presence of the Chaplygin gas (with $alpha>0$). We recover the standard results at the dust limit ($Arightarrow 0$). In particular, for the exponential potential, the late-time attractor is a pure generalized Chaplygin solution mimicking an effective cosmological constant. In the case of arbitrary potentials, the late-time attractors are de Sitter solutions in the form of a cosmological constant, a pure generalized Chaplygin solution or a continuum of solutions, when the scalar field and the Chaplygin gas densities are of the same orders of magnitude. The different situations depend on the parameter choices.