Many implantable devices are made of synthetic polymers which upon insertion absorb water, causing the polymer to swell and form a gel (mixture of solid and fluid). Since the swelling leads to an expansion of the polymer, a gel is considered to be a compressible material. A high concentration of stress due to the swelling may lead to the nucleation and growth of cavities within the gel, which is likely to cause the debonding of the material from the support it is attached to. In this dissertation, we focus on the cavitation in a gel occupying a spherical domain, subject to either displacement boundary conditions or free swelling. We consider a total free energy of the gel accounting for the elasticity of the polymer and for the mixing between polymer and fluid, called the Flory-Huggins energy. In addition to penalizing gel deformation, the free energy represents competing effects of entropy that favours mixing, polymerpolymer and fluid-fluid interaction forces. We study the material properties necessary to allow for a nucleation of cavities and analyze radially symmetric deformations.