Why is Larry Niven's Ringworld Unstable?

It is only for a spherically symmetric shape that you can treat an extended body as if it were a point mass at the CoM.

The Ringworld is

  • stable against axial displacements after which it will gently bob back and forth around the star.
  • unstable against transverse ones because the gravitational attraction of the near-side is greater than that of the far-side.

http://www.alcyone.com/max/writing/essays/why-niven-rings-are-unstable.html

The short version: a Dyson sphere is stable because even if the sphere gets off-center, there is no net attraction or repulsion (the extra mass of the parts further away help offset any attraction from parts closer to the star).

The ring doesn't have this advantage because, being confined to a plane (mostly), it doesn't have sufficient mass further away to counteract the runaway attraction that would happen if the ring moved off-center.